:root {
    --bg-gradient: linear-gradient(135deg, #1A5F8C 0%, #0F3A5A 100%);
    --mobile-bg: #0A1128;
    --mobile-card-bg: #141E38;
    --text-primary: #FFFFFF;
    --text-secondary: #B0C4DE;
    --btn-primary-bg: #98E8C1;
    --btn-primary-text: #0F3A5A;
    --btn-primary-hover: #7FDBA7;
    --modal-bg: #F5F7FA;
    --modal-text: #1E293B;
    --highlight: #2A81B8;
    --border-color: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(-45deg, #1A5F8C, #0F3A5A, #2A81B8, #0A1128);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

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

.view-container {
    width: 100%;
    height: 100vh;
    display: none; /* hidden by default, toggled via JS */
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
}

/* ================== MOBILE VIEW ================== */
#mobile-view {
    background-color: rgba(10, 17, 40, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.mobile-card {
    background: rgba(20, 30, 56, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 28px;
    padding: 50px 35px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.08);
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.icon-container {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, rgba(42, 129, 184, 0.2) 0%, rgba(152, 232, 193, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px;
    color: var(--highlight);
    border: 1px solid rgba(152, 232, 193, 0.3);
    box-shadow: 0 0 30px rgba(42, 129, 184, 0.4);
    animation: pulseIcon 3s infinite ease-in-out;
}

@keyframes pulseIcon {
    0% { box-shadow: 0 0 0 0 rgba(42, 129, 184, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(42, 129, 184, 0); }
    100% { box-shadow: 0 0 0 0 rgba(42, 129, 184, 0); }
}

.mobile-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #FFFFFF, #B0C4DE);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 36px;
    opacity: 0.9;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(15, 58, 90, 0.4);
    border-radius: 30px;
    color: var(--btn-primary-bg);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(152, 232, 193, 0.2);
    position: relative;
}

.secure-badge::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10B981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* ================== DESKTOP VIEW ================== */
.desktop-content {
    text-align: center;
    max-width: 700px;
    padding: 40px;
    z-index: 10;
}

.desktop-content h1 {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.desktop-content .subtitle {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 48px;
    opacity: 0.9;
}

.actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 320px;
    padding: 16px 24px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    box-shadow: 0 8px 20px rgba(152, 232, 193, 0.3);
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border-radius: 44px;
    background: linear-gradient(45deg, #98E8C1, #7FDBA7, #2A81B8, #98E8C1);
    z-index: -1;
    background-size: 400%;
    animation: glowing 20s linear infinite;
    opacity: 0.6;
    transition: opacity 0.3s ease-in-out;
    filter: blur(8px);
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

.btn-primary:hover {
    background-color: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(152, 232, 193, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary.downloaded {
    background-color: transparent;
    border: 2px solid var(--btn-primary-bg);
    color: var(--btn-primary-bg);
    box-shadow: none;
    animation: popButton 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popButton {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-primary.downloaded::before {
    display: none;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ================== MODAL ================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 100;
}

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

.modal {
    background-color: var(--modal-bg);
    color: var(--modal-text);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--highlight);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #1A5F8C;
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    color: var(--highlight);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.divider {
    width: 40px;
    height: 3px;
    background-color: #E24A4A;
    margin: 0 auto;
    border-radius: 2px;
}

.instruction-box {
    background-color: white;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 24px;
    color: #334155;
}

.steps {
    list-style-position: inside;
    list-style-type: decimal;
    padding: 0 10px;
}

.steps li {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #475569;
}

.steps .highlight {
    color: var(--highlight);
    font-weight: 600;
    background: rgba(42, 129, 184, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ================== ANIMATIONS ================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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