/* Local Fonts */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./assets/fonts/inter-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/fonts/inter-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./assets/fonts/inter-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./assets/fonts/inter-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./assets/fonts/inter-700.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/fonts/jetbrains-mono-400.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./assets/fonts/jetbrains-mono-500.woff2') format('woff2');
}

/* CSS Reset and Variables */
:root {
    --primary-color: #627eea;
    --secondary-color: #9d4edd;
    --accent-color: #f72585;
    --bg-dark: #0d1117;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --border-color: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cyber: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%);
    --gradient-pixel: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-vintage: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    
    /* 新增：更柔和的颜色变量 */
    --primary-color-soft: rgba(98, 126, 234, 0.8);
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(98, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(98, 126, 234, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 15s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% { opacity: 0.4; }
    100% { opacity: 0.7; }
}

/* App Container */
.app-container {
    min-height: 100vh;
    position: relative;
}

/* Header */
.app-header {
    position: relative;
    padding: 1rem 2rem 2rem;
    text-align: center;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-main);
    opacity: 0.08;
    z-index: -1;
}

.main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    
    /* 修复：改为安全的文本颜色而非背景裁剪 */
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* 添加回退颜色 */
    color: var(--primary-color);
}

/* 为不支持背景裁剪的浏览器提供回退 */
@supports not (-webkit-background-clip: text) {
    .main-title {
        color: var(--primary-color);
        background: none;
    }
}

.eth-icon {
    font-size: 0.1em;
    color: var(--primary-color);
    text-shadow: 0 0 20px currentColor;
    animation: ethGlow 3s ease-in-out infinite alternate;
}

@keyframes ethGlow {
    0% { 
        text-shadow: 0 0 20px currentColor;
        filter: brightness(1);
    }
    100% { 
        text-shadow: 0 0 30px currentColor, 0 0 40px currentColor;
        filter: brightness(1.2);
    }
}

.anniversary-badge {
    background: rgba(98, 126, 234, 0.15);
    border: 1px solid rgba(98, 126, 234, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.6em;
    font-weight: 500;
    color: var(--primary-color);
    text-shadow: none;
    -webkit-text-fill-color: var(--primary-color);
    animation: badgeGlow 3s ease-in-out infinite alternate;
    box-shadow: 0 2px 8px rgba(98, 126, 234, 0.2);
    backdrop-filter: blur(4px);
}

@keyframes badgeGlow {
    0% { 
        box-shadow: 0 2px 8px rgba(98, 126, 234, 0.2);
        border-color: rgba(98, 126, 234, 0.3);
    }
    100% { 
        box-shadow: 0 4px 16px rgba(98, 126, 234, 0.4);
        border-color: rgba(98, 126, 234, 0.5);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 0 2rem 3rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Sections */
section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

section:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-title .icon {
    font-size: 1.2em;
}

/* Upload Section */
.upload-tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: var(--gradient-main);
    color: white;
    border-color: transparent;
}

.tab-btn:hover:not(.active) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.upload-tab {
    display: none;
}

.upload-tab.active {
    display: block;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(98, 126, 234, 0.08);
    box-shadow: 0 8px 25px rgba(98, 126, 234, 0.15);
    transform: translateY(-2px);
}

.file-upload-area:hover::before {
    left: 100%;
}

.file-upload-area.dragover {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ENS Input */
.ens-input-group {
    display: flex;
    gap: 0.75rem;
}

.ens-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.ens-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(98, 126, 234, 0.1);
}

.ens-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ens-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ens-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}

.ens-status.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
    backdrop-filter: blur(10px);
}

.ens-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
}

.ens-status.loading {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
}

.ens-status.loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid var(--info-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Avatar Preview */
.avatar-preview {
    margin-top: 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style Grid */
.style-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.style-card {
    padding: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.25);  /* Increased from 0.15 to 0.25 for better visibility */
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);  /* Added subtle background for better definition */
}

.style-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);  /* Increased from 0.02 to 0.08 for visible hover effect */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.style-card:hover::before {
    transform: translateX(0);
}

.style-card:hover {
    border-color: rgba(255, 255, 255, 0.4);  /* Enhanced hover border visibility */
    transform: translateY(-2px);  /* Added subtle lift effect */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);  /* Added hover shadow */
}

.style-card.active {
    border-color: var(--primary-color);
    background: rgba(98, 126, 234, 0.15);  /* Increased opacity for better visibility */
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(98, 126, 234, 0.4);  /* Enhanced shadow for active state */
    transform: translateY(-1px);  /* Slight lift for active state */
}

.style-card.active h4 {
    color: #ffffff;  /* Ensure title is fully white when active */
}

.style-card.active p {
    color: rgba(255, 255, 255, 0.9);  /* Lighter text for active state */
}

.style-card h4 {
    margin: 1rem 0 0.5rem;
    font-weight: 600;
}

.style-card p {
    color: var(--text-secondary);  /* Changed from --text-muted to --text-secondary for better contrast */
    font-size: 0.9rem;
    font-weight: 500;  /* Add font weight for better readability */
}

.style-preview {
    height: 60px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);  /* Added border for better definition */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);  /* Added inner shadow for depth */
}

.cyberpunk-preview {
    background: var(--gradient-cyber);
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

.pixel-preview {
    background: 
        /* 像素艺术色块 */
        linear-gradient(to right, 
            #ff6b6b 0%, #ff6b6b 20%,
            #4ecdc4 20%, #4ecdc4 40%,
            #45b7d1 40%, #45b7d1 60%,
            #f9ca24 60%, #f9ca24 80%,
            #f0932b 80%, #f0932b 100%
        ),
        /* 像素网格效果 */
        linear-gradient(45deg, rgba(255,255,255,0.3) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(255,255,255,0.3) 25%, transparent 25%);
    background-size: 100% 100%, 6px 6px, 6px 6px;
    background-position: 0 0, 0 0, 3px 3px;
    position: relative;
    overflow: hidden;
}

.pixel-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: 
        linear-gradient(to right, #fff 0%, #fff 25%, #000 25%, #000 50%, #fff 50%, #fff 75%, #000 75%),
        linear-gradient(to bottom, #fff 0%, #fff 25%, #000 25%, #000 50%, #fff 50%, #fff 75%, #000 75%);
    background-size: 4px 4px;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.vintage-preview {
    background: var(--gradient-vintage);
    position: relative;
}

.vintage-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.2) 100%);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Form Elements */
.info-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.styled-input,
.styled-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.styled-input:focus,
.styled-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(98, 126, 234, 0.1);
}

.styled-select {
    cursor: pointer;
}

/* Fix select dropdown options styling */
.styled-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Generate Button */
.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:active {
    transform: translateY(0);
}

/* Preview Panel */
.preview-panel {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.canvas-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

#previewCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.overlay-content {
    text-align: center;
    padding: 2rem;
}

.eth-logo {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px currentColor;
    animation: ethGlow 2s ease-in-out infinite alternate;
}

.overlay-content h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.overlay-content p {
    color: var(--text-secondary);
}

/* Canvas Actions */
.canvas-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.action-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.download-btn:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--success-color);
    color: var(--success-color);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.share-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--info-color);
    color: var(--info-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.regenerate-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--warning-color);
    color: var(--warning-color);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading-content p {
    color: var(--text-secondary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--success-color);
    background: rgba(34, 197, 94, 0.1);
}

.toast.error {
    border-left: 4px solid var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.toast.info {
    border-left: 4px solid var(--info-color);
    background: rgba(59, 130, 246, 0.1);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .preview-panel {
        position: static;
    }
    
    .style-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem 2rem;
    }
    
    .app-header {
        padding: 1rem 1rem 1rem;
    }
    
    .main-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .anniversary-badge {
        font-size: 0.8rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    .style-grid {
        grid-template-columns: 1fr;
    }
    
    .ens-input-group {
        flex-direction: column;
    }
    
    .canvas-actions {
        flex-direction: column;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .upload-tab-buttons {
        flex-direction: column;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .generate-btn {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Language Switcher */

.language-switcher {
    position: relative;
    display: inline-block;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.language-icon {
    font-size: 1.1rem;
}

.language-text {
    min-width: 60px;
    text-align: left;
}

.language-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 150px;
    z-index: 1001;
    overflow: hidden;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.language-option.active {
    background: rgba(98, 126, 234, 0.15);
    color: var(--primary-color);
}

.language-flag {
    font-size: 1.2rem;
}

.language-name {
    font-weight: 500;
}

.header-top {
    position: relative;
    display: flex;
    justify-content: center; /* Center the title */
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0 2rem; /* Remove top padding to eliminate extra space */
}

.language-switcher-container {
    position: absolute;
    top: 1.5em; /* Align horizontally with title */
    right: 0; /* Increase right margin to avoid overlap with 2015-2025 badge */
    z-index: 1000;
}

/* Enhanced responsive design for language switcher */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    
    .language-switcher-container {
        position: static; /* Back to normal flow on mobile */
        order: -1; /* Show language switcher first on mobile */
        margin-bottom: 1rem;
    }
    
    .main-title {
        flex: none; /* Remove flex: 1 on mobile */
    }
    
    .language-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Medium screens adjustment */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-top {
        padding: 0 1.5rem;
    }
    
    .language-switcher-container {
        right: 2.5rem; /* Maintain adequate margin for medium screens */
    }
}

/* ===== FOOTER STYLES ===== */
.app-footer {
    margin-top: 4rem;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-main {
    margin-bottom: 2rem;
}

.copyright-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.8rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

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

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(98, 126, 234, 0.5);
}

.footer-link:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.footer-link:hover:after {
    width: 100%;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.footer-anniversary {
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.9rem;
}

/* Footer responsive design */
@media (max-width: 768px) {
    .app-footer {
        margin-top: 3rem;
        padding: 2rem 1rem 1.5rem;
    }
    
    .footer-main {
        margin-bottom: 1.5rem;
    }
    
    .copyright-text {
        font-size: 1rem;
    }
    
    .footer-subtitle {
        font-size: 0.85rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .footer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .app-footer {
        padding: 1.5rem 1rem 1rem;
    }
    
    .copyright-text {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    .footer-subtitle {
        font-size: 0.8rem;
    }
} 