:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.15);
    --accent-glow: rgba(16, 185, 129, 0.3);
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    background: var(--bg-primary);
}

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

svg {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.redirect-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0c1220 50%, var(--bg-primary) 100%);
}

.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.glow-effect {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-glow);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.glow-3 {
    width: 250px;
    height: 250px;
    background: rgba(245, 158, 11, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

.glow-4 {
    width: 200px;
    height: 200px;
    background: rgba(239, 68, 68, 0.1);
    top: 30%;
    right: 10%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.redirect-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
    animation: cardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.redirect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    animation: logoPulse 2s ease-in-out infinite, logoFloat 4s ease-in-out infinite;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-lg);
    background: linear-gradient(45deg, var(--accent), transparent, var(--accent));
    opacity: 0;
    animation: borderGlow 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow: 0 0 30px var(--accent-glow);
    }
    50% {
        box-shadow: 0 0 50px var(--accent-glow);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
}

.brand-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, var(--text-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

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

.brand-tagline {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.redirect-content {
    margin-bottom: 32px;
}

.loading-section {
    text-align: center;
    margin-bottom: 32px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite, spinnerPulse 2s ease-in-out infinite;
}

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

@keyframes spinnerPulse {
    0%, 100% {
        box-shadow: 0 0 10px var(--accent-glow);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-glow);
    }
}

.redirect-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.redirect-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 9999px;
    width: 0%;
    transition: width 0.1s linear;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 10px var(--accent-glow);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-glow);
    }
}

.countdown-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.countdown-text span {
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
}

.manual-redirect {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.manual-text {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 8px 25px var(--accent-glow);
    transform: translateY(-3px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: featureSlideIn 0.5s ease-out forwards;
    opacity: 0;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

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

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.15), transparent);
    transition: left 0.5s ease;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .redirect-container {
        padding: 16px;
    }

    .redirect-card {
        padding: 32px 24px;
    }

    .logo-icon {
        width: 64px;
        height: 64px;
    }

    .brand-name {
        font-size: 26px;
    }

    .brand-tagline {
        font-size: 13px;
    }

    .redirect-title {
        font-size: 18px;
    }

    .redirect-subtitle {
        font-size: 13px;
    }

    .spinner {
        width: 40px;
        height: 40px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        gap: 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .redirect-card {
        padding: 24px 20px;
    }

    .brand-name {
        font-size: 22px;
    }

    .feature-item {
        padding: 10px 12px;
    }

    .feature-icon {
        width: 32px;
        height: 32px;
    }

    .feature-icon svg {
        width: 16px;
        height: 16px;
    }

    .feature-item span {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .redirect-card,
    .logo-icon,
    .spinner,
    .progress-fill,
    .glow-effect,
    .feature-item {
        animation: none;
    }
}
