/* Hala Gaming Pro - Main CSS */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables */
:root {
    --hala-primary-bg: #000000;
    --hala-secondary-bg: #111111;
    --hala-tertiary-bg: #1a1a1a;
    --hala-accent-cyan: #06b6d4;
    --hala-accent-purple: #8b5cf6;
    --hala-accent-pink: #ec4899;
    --hala-accent-green: #10b981;
    --hala-accent-red: #ef4444;
    --hala-text-primary: #ffffff;
    --hala-text-secondary: #cccccc;
    --hala-text-muted: #888888;
    --hala-border-color: rgba(139, 92, 246, 0.2);
    --hala-border-light: rgba(255, 255, 255, 0.1);
    --hala-gradient-primary: linear-gradient(45deg, #06b6d4, #8b5cf6);
    --hala-gradient-hero: linear-gradient(45deg, #06b6d4, #8b5cf6, #ec4899);
    --hala-shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --hala-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --hala-transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hala-transition-fast: all 0.2s ease;
    --hala-border-radius: 8px;
    --hala-border-radius-lg: 12px;
}

/* 基礎重置 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--hala-primary-bg);
    color: var(--hala-text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding-top: 80px;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 頁首樣式 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hala-border-color);
    transition: var(--hala-transition-smooth);
}

.site-header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: var(--hala-shadow-glow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    min-height: 80px;
}

/* Logo 樣式 */
.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--hala-text-primary);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    transition: var(--hala-transition-smooth);
}

.site-logo:hover {
    color: var(--hala-accent-cyan);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--hala-gradient-primary);
    border-radius: var(--hala-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hala-transition-smooth);
}

.site-logo:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: var(--hala-shadow-glow);
}

.custom-logo {
    max-height: 40px;
    width: auto;
}

/* 導航樣式 */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.desktop-menu {
    display: flex;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    color: var(--hala-text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--hala-transition-smooth);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--hala-accent-cyan);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--hala-gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 工具列樣式 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle,
.cart-toggle,
.account-toggle {
    background: none;
    border: none;
    color: var(--hala-text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--hala-border-radius);
    transition: var(--hala-transition-smooth);
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover,
.cart-toggle:hover,
.account-toggle:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--hala-accent-cyan);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--hala-accent-pink);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

.consult-btn {
    background: var(--hala-gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--hala-border-radius);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--hala-transition-smooth);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.consult-btn:hover {
    background: linear-gradient(45deg, #0891b2, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    color: white;
    text-decoration: none;
}

/* 手機版選單 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--hala-text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--hala-border-radius);
    transition: var(--hala-transition-smooth);
}

.mobile-menu-toggle:hover {
    background: rgba(139, 92, 246, 0.1);
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--hala-text-primary);
    transition: var(--hala-transition-smooth);
    transform-origin: center;
}

.hamburger span.active:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger span.active:nth-child(2) {
    opacity: 0;
}

.hamburger span.active:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--hala-border-color);
    padding: 2rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--hala-transition-smooth);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0 0 2rem 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin-bottom: 1rem;
}

.mobile-nav-menu a {
    color: var(--hala-text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--hala-border-light);
    transition: var(--hala-transition-smooth);
}

.mobile-nav-menu a:hover {
    color: var(--hala-accent-cyan);
    padding-left: 1rem;
}

.mobile-tools {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-cart,
.mobile-account,
.mobile-consult {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--hala-border-radius);
    text-decoration: none;
    color: var(--hala-text-primary);
    transition: var(--hala-transition-smooth);
    border: 1px solid var(--hala-border-light);
}

.mobile-cart:hover,
.mobile-account:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--hala-accent-purple);
    color: var(--hala-accent-cyan);
}

.mobile-consult {
    background: var(--hala-gradient-primary);
    border-color: transparent;
    justify-content: center;
}

.mobile-consult:hover {
    background: linear-gradient(45deg, #0891b2, #7c3aed);
    color: white;
}

/* 搜尋覆蓋層 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--hala-transition-smooth);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--hala-text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--hala-border-radius);
    transition: var(--hala-transition-smooth);
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hala-accent-cyan);
}

.search-form-wrapper {
    margin-top: 3rem;
}

/* 頁尾樣式 */
.site-footer {
    background: var(--hala-secondary-bg);
    border-top: 1px solid var(--hala-border-color);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--hala-text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p,
.footer-section li {
    color: var(--hala-text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: var(--hala-text-secondary);
    text-decoration: none;
    transition: var(--hala-transition-smooth);
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--hala-accent-cyan);
    transform: translateX(5px);
}

.footer-contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--hala-border-radius);
    text-decoration: none;
    transition: var(--hala-transition-smooth);
    font-weight: 500;
    border: 1px solid var(--hala-border-light);
}

.line-btn {
    color: var(--hala-accent-green);
    border-color: var(--hala-accent-green);
}

.line-btn:hover {
    background: var(--hala-accent-green);
    color: white;
    transform: translateY(-2px);
}

.shop-btn {
    color: var(--hala-accent-cyan);
    border-color: var(--hala-accent-cyan);
}

.shop-btn:hover {
    background: var(--hala-accent-cyan);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--hala-border-light);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright,
.footer-credits {
    color: var(--hala-text-muted);
    font-size: 0.9rem;
}

.footer-credits a {
    color: var(--hala-accent-cyan);
    text-decoration: none;
}

.footer-credits a:hover {
    text-decoration: underline;
}

/* 回到頂部按鈕 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--hala-gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: var(--hala-transition-smooth);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: var(--hala-shadow-card);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(45deg, #0891b2, #7c3aed);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* 內容區域樣式 */
.content-area {
    flex: 1;
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--hala-border-light);
}

.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--hala-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 文章卡片樣式 */
.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--hala-secondary-bg);
    border-radius: var(--hala-border-radius-lg);
    overflow: hidden;
    transition: var(--hala-transition-smooth);
    border: 1px solid var(--hala-border-light);
    box-shadow: var(--hala-shadow-card);
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--hala-accent-cyan);
    box-shadow: var(--hala-shadow-glow);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--hala-transition-smooth);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.entry-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.entry-title a {
    color: var(--hala-text-primary);
    text-decoration: none;
    transition: var(--hala-transition-smooth);
}

.entry-title a:hover {
    color: var(--hala-accent-cyan);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--hala-text-muted);
}

.entry-meta a {
    color: var(--hala-accent-cyan);
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-content {
    color: var(--hala-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--hala-accent-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: var(--hala-transition-smooth);
}

.read-more:hover {
    color: var(--hala-accent-purple);
    transform: translateX(5px);
}

/* 分頁導航 */
.navigation.pagination {
    margin: 3rem 0;
    text-align: center;
}

.page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-numbers a,
.page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border-radius: var(--hala-border-radius);
    text-decoration: none;
    transition: var(--hala-transition-smooth);
    border: 1px solid var(--hala-border-light);
}

.page-numbers a {
    color: var(--hala-text-primary);
    background: var(--hala-secondary-bg);
}

.page-numbers a:hover {
    background: var(--hala-accent-purple);
    border-color: var(--hala-accent-purple);
    color: white;
}

.page-numbers .current {
    background: var(--hala-gradient-primary);
    border-color: transparent;
    color: white;
}

/* 側邊欄樣式 */
.widget-area {
    padding: 2rem 0;
}

.widget {
    background: var(--hala-secondary-bg);
    border-radius: var(--hala-border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--hala-border-light);
}

.widget-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--hala-text-primary);
    border-bottom: 2px solid var(--hala-accent-purple);
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hala-border-light);
}

.widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget a {
    color: var(--hala-text-secondary);
    text-decoration: none;
    transition: var(--hala-transition-smooth);
}

.widget a:hover {
    color: var(--hala-accent-cyan);
}

/* 表單樣式 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    background: var(--hala-tertiary-bg);
    border: 1px solid var(--hala-border-light);
    border-radius: var(--hala-border-radius);
    color: var(--hala-text-primary);
    padding: 0.75rem;
    width: 100%;
    transition: var(--hala-transition-smooth);
    font-family: 'Rajdhani', sans-serif;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--hala-accent-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

button,
.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    background: var(--hala-gradient-primary);
    color: white;
    border: none;
    border-radius: var(--hala-border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--hala-transition-smooth);
    text-decoration: none;
    display: inline-block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
    background: linear-gradient(45deg, #0891b2, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    color: white;
    text-decoration: none;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .consult-btn {
        display: none;
    }
    
    .header-tools {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        padding: 0.75rem 0;
        min-height: 70px;
    }
    
    .site-main {
        padding-top: 70px;
    }
    
    .site-logo {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .posts-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .mobile-menu {
        padding: 1.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .site-logo {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .mobile-menu {
        padding: 1rem;
    }
    
    .posts-container {
        gap: 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
}

/* 輔助功能 */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.skip-link {
    background: var(--hala-accent-cyan);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 100000;
    transition: top 0.3s;
    border-radius: var(--hala-border-radius);
}

.skip-link:focus {
    top: 6px;
}

/* 載入動畫 */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--hala-accent-cyan);
    border-top-color: transparent;
    border-radius: 50%;
    animation: halaSpinner 1s linear infinite;
}

@keyframes halaSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* 自訂滾動條 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--hala-secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--hala-accent-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hala-accent-cyan);
}

/* 選取文字樣式 */
::selection {
    background: var(--hala-accent-cyan);
    color: white;
}

::-moz-selection {
    background: var(--hala-accent-cyan);
    color: white;
}

/* 確保圖片響應式 */
img {
    max-width: 100%;
    height: auto;
}

/* 清除浮動 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 文字漸變效果 */
.text-gradient {
    background: var(--hala-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 鍵盤導航樣式 */
.keyboard-navigation *:focus {
    outline: 2px solid var(--hala-accent-cyan);
    outline-offset: 2px;
}

/* 打印樣式 */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu,
    .back-to-top,
    .search-overlay {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .site-main {
        padding-top: 0;
    }
}
