/* Modern Premium Redirect Stylesheet */
:root {
    --bg-primary: hsl(248, 25%, 4%);
    --bg-card: rgba(10, 10, 18, 0.6);
    --primary: hsl(271, 91%, 65%);
    --secondary: hsl(192, 95%, 48%);
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 15%, 75%);
    --text-muted: hsl(215, 12%, 55%);
    --accent: hsl(271, 91%, 70%);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(168, 85, 247, 0.2);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Ambient glowing background blobs */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#glow-1 {
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

#glow-2 {
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
}

/* Dot grid overlay for texture */
.background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 1;
}

/* Container */
.redirect-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Premium Glassmorphic Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 48px 40px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        0 0 50px 0px rgba(168, 85, 247, 0.05),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
    transition: border-color 0.5s, box-shadow 0.5s, transform 0.3s;
    animation: cardIntro 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: 
        0 15px 40px -10px rgba(0, 0, 0, 0.6),
        0 0 60px 5px rgba(168, 85, 247, 0.08),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

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

/* Security Badge */
.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.18);
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lock-icon {
    stroke-dasharray: 40;
    animation: lockSecure 2s ease-in-out infinite alternate;
}

@keyframes lockSecure {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 2px var(--secondary)); }
}

/* Typography */
.title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 30%, #a3a3a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 36px;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.destination-url {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px dashed var(--primary);
    padding-bottom: 1px;
}

/* Countdown Visualizer */
.countdown-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring-bar {
    stroke-dasharray: 440;
    stroke-dashoffset: 0; /* Updated via JS to count down */
    transition: stroke-dashoffset 0.1s linear;
}

.countdown-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.countdown-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* Loading Dots */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 36px;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary);
    opacity: 0.3;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
    background-color: var(--primary);
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
    background-color: var(--accent);
}

@keyframes dotPulse {
    0%, 80%, 100% { 
        transform: scale(0.6);
        opacity: 0.3;
    } 40% { 
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Glowing Call to Action Button */
.action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, hsl(263, 70%, 50%) 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 16px 28px;
    border-radius: 16px;
    overflow: hidden;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px -2px rgba(168, 85, 247, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fadeInUp 0.8s ease-out 0.7s both;
    z-index: 2;
}

.action-btn span {
    z-index: 3;
}

.action-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: 0.5s;
    z-index: 2;
}

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

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px -4px rgba(168, 85, 247, 0.6),
        0 0 0 3px rgba(168, 85, 247, 0.2);
}

.action-btn:active {
    transform: translateY(1px);
}

.arrow-icon {
    transition: transform 0.3s ease;
    z-index: 3;
}

.action-btn:hover .arrow-icon {
    transform: translateX(4px);
}

/* Footer Section */
.footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 80%;
    animation: fadeIn 0.8s ease-out 0.9s both;
}

.copyright {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* General Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Media Queries for Responsive Design */
@media (max-width: 480px) {
    .glass-card {
        padding: 36px 24px;
    }
    .title {
        font-size: 1.85rem;
    }
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 28px;
    }
    .countdown-wrapper {
        width: 140px;
        height: 140px;
        margin-bottom: 28px;
    }
    .countdown-number {
        font-size: 3rem;
    }
    .progress-ring {
        width: 140px;
        height: 140px;
    }
    .progress-ring-bg,
    .progress-ring-bar {
        r: 60;
        cx: 70;
        cy: 70;
    }
}
