/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #e5e5e5;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Base styles */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 100;
}

.lang-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.lang-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.flag {
    font-size: 1.25rem;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.sun-icon { display: block; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Container */
.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

/* Logo */
.logo-container {
    margin-bottom: var(--spacing-xl);
}

.logo {
    color: var(--accent);
    animation: rotate 10s linear infinite;
}

.progress-ring {
    animation: progressFill 2s ease-out forwards;
}

/* Typography */
.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* Domain Info */
.domain-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.domain-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.domain-name {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
}


/* Estimated Time */
.estimated-time {
    margin-bottom: var(--spacing-xl);
}

.estimated-time p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.countdown {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

/* Refresh Notice */
.refresh-notice {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xl);
}

.refresh-icon {
    animation: rotate 2s linear infinite;
}

/* Support Section */
.support-section {
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

.support-section p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.support-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.support-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes progressFill {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: var(--spacing-md);
    }
    
    .language-switcher {
        top: var(--spacing-md);
        right: var(--spacing-md);
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .lang-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.75rem;
    }
    
    .flag {
        font-size: 1rem;
    }
    
    .theme-toggle {
        top: var(--spacing-md);
        left: var(--spacing-md);
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .message {
        font-size: 1rem;
    }
    
    
    .countdown {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .language-switcher,
    .theme-toggle {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --accent: #0066cc;
        --accent-hover: #0052a3;
    }
    
    [data-theme="dark"] {
        --accent: #66b3ff;
        --accent-hover: #4da3ff;
    }
}

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