:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --primary-color: #25d366; /* WhatsApp Green */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(37, 211, 102, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(37, 211, 102, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.download-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.download-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.warning-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-download {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-empty { opacity: 0.6; cursor: default; }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 20px;
}

.modal.active { opacity: 1; visibility: visible; }

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content { transform: scale(1); }

.verify-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.code-input {
    width: 55px;
    height: 65px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(37, 211, 102, 0.05);
}

.error-text {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: none;
}

.resend-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-link:disabled {
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.7;
}

.modal-footer {
    display: flex;
    gap: 1rem;
}

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-cancel { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.btn-confirm { background: var(--primary-color); color: white; }
.btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 10px 20px var(--accent-glow); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.shake { animation: shake 0.4s ease-in-out; }

@media (max-width: 640px) {
    body { padding: 1rem; }
    h1 { font-size: 1.8rem; }
    p.subtitle { font-size: 0.95rem; margin-bottom: 2rem; }
    .download-grid { grid-template-columns: 1fr; gap: 1rem; }
    .modal-content { padding: 2rem 1.5rem; border-radius: 24px; }
    .code-input { width: 50px; height: 60px; font-size: 1.25rem; border-radius: 12px; }
    .verify-inputs { gap: 0.5rem; }
}
