:root {
    --color-purple-400: #a78bfa;
    --color-purple-500: #8b5cf6;
    --color-purple-600: #7c3aed;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-800: #1f2937;
    --color-red-500: #ef4444;
    --color-green-500: #22c55e;
    --color-white: #ffffff;
    --color-black: #000000;
    --bg-dark: #0a0a1a;
    --dark-input-background: #1f2937;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--color-gray-300);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

/* Universal Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

a { text-decoration: none; color: var(--color-purple-400); }

/* Header Styles */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.95); /* Increased opacity */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    /* Ensure header doesn't get cut off on notch phones */
    padding-top: env(safe-area-inset-top); 
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}
.logo { font-size: 1.5rem; font-weight: 900; color: var(--color-white); }
.logo span { color: var(--color-purple-400); }

/* Language Switcher */
.lang-switch {
    background: var(--color-purple-600);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}
.lang-switch:hover { background: var(--color-purple-500); }

/* Main Content */
/* Increased padding-top to prevent header overlap */
main { padding-top: 200px; padding-bottom: 4rem; }

.policy-header {
    text-align: center;
    margin-bottom: 3rem;
}
.policy-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 1rem;
}
.policy-subtitle {
    font-size: 1.1rem;
    color: var(--color-gray-400);
    max-width: 800px;
    margin: 0 auto;
}

/* Warning Banner */
.warning-banner {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--color-red-500);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.warning-icon { color: var(--color-red-500); flex-shrink: 0; }

/* Policy Cards */
.policy-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s;
}
.policy-card:hover { border-color: var(--color-purple-500); }

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}
.step-num {
    background: var(--color-purple-600);
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
}

/* Graphic Representations (CSS Made) */
.graphic-container {
    background: #111;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px dashed var(--color-gray-800);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.phone-screen {
    background: #1f2937;
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #374151;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.toggle-switch {
    width: 36px; height: 20px;
    background: #4b5563;
    border-radius: 20px;
    position: relative;
}
.toggle-switch.on { background: var(--color-purple-500); }
.toggle-switch::after {
    content: ''; position: absolute;
    width: 16px; height: 16px;
    background: white; border-radius: 50%;
    top: 2px; left: 2px;
    transition: left 0.3s;
}
.toggle-switch.on::after { left: 18px; }

/* Harmful App Alert Graphic */
.alert-box {
    background: #374151;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid var(--color-red-500);
    margin-bottom: 10px;
}
.alert-title {
    color: var(--color-red-500);
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.alert-btn {
    background: transparent;
    border: 1px solid var(--color-green-500);
    color: var(--color-green-500);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    display: inline-block;
    margin-top: 6px;
}

/* Footer */
.footer {
    background-color: var(--color-black);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--color-gray-800);
}

/* Action Sequence Box (Step 4) */
.action-sequence-box {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}
.action-sequence-box h3 {
    color: var(--color-white);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}
.action-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-weight: bold;
    font-size: 1.1rem;
    flex-wrap: wrap;
}
.action-steps .on-text {
    color: var(--color-green-500);
}
.action-steps .off-text {
    color: var(--color-red-500);
}
.action-steps .arrow {
    color: var(--color-gray-400);
}
.action-note {
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.important-text { color: var(--color-purple-400); font-weight: 600; }
.danger-text { color: var(--color-red-500); font-weight: 600; }

/* ========== RESPONSIVE DESIGN ========== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1100px;
    }
    .policy-title {
        font-size: 3rem;
    }
    .policy-card {
        padding: 2.5rem;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 960px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .policy-title {
        font-size: 2.2rem;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .container {
        max-width: 720px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .policy-title {
        font-size: 2rem;
    }
    .policy-subtitle {
        font-size: 1rem;
    }
    .card-title {
        font-size: 1.3rem;
    }
    .policy-card {
        padding: 1.5rem;
    }
    .warning-banner {
        padding: 1.25rem;
    }
    main {
        padding-top: 140px;
    }
}

/* Mobile Landscape & Small Tablets (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .policy-title {
        font-size: 1.8rem;
    }
    .policy-subtitle {
        font-size: 0.95rem;
    }
    .card-title {
        font-size: 1.2rem;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .policy-card {
        padding: 1.25rem;
        border-radius: 1rem;
    }
    .warning-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    .warning-icon {
        margin: 0 auto;
    }
    main {
        padding-top: 120px;
        padding-bottom: 3rem;
    }
    .header-content {
        padding: 0.75rem 0;
    }
    .logo {
        font-size: 1.3rem;
    }
    .lang-switch {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    .phone-screen {
        max-width: 280px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Header Mobile */
    .header-content {
        padding: 0.5rem 0;
        flex-wrap: nowrap;
    }
    .logo {
        font-size: 1.1rem;
    }
    .lang-switch {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        gap: 3px;
    }
    .lang-switch svg {
        width: 16px;
        height: 16px;
    }
    
    /* Main Content Mobile */
    main {
        padding-top: 100px;
        padding-bottom: 2rem;
    }
    
    /* Policy Header Mobile */
    .policy-header {
        margin-bottom: 2rem;
    }
    .policy-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    .policy-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Warning Banner Mobile */
    .warning-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.75rem;
        border-radius: 0.75rem;
        margin-bottom: 2rem;
    }
    .warning-icon {
        margin: 0 auto;
    }
    .warning-icon svg {
        width: 28px;
        height: 28px;
    }
    .warning-banner h3 {
        font-size: 1rem;
    }
    .warning-banner p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Policy Cards Mobile */
    .policy-card {
        padding: 1rem;
        border-radius: 1rem;
        margin-bottom: 1.5rem;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    .step-num {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    .policy-card p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    .policy-card ul {
        padding-left: 1rem;
    }
    .policy-card li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }
    
    /* Graphics Container Mobile */
    .graphic-container {
        padding: 1rem;
        border-radius: 0.75rem;
        margin: 1rem 0;
    }
    .phone-screen {
        max-width: 100%;
        width: 100%;
        padding: 12px;
    }
    .setting-row {
        padding: 8px;
        margin-bottom: 6px;
    }
    .setting-row div:first-child {
        font-size: 11px !important;
    }
    .toggle-switch {
        width: 32px;
        height: 18px;
        flex-shrink: 0;
    }
    .toggle-switch::after {
        width: 14px;
        height: 14px;
    }
    .toggle-switch.on::after {
        left: 16px;
    }
    
    /* Alert Box Mobile */
    .alert-box {
        padding: 10px;
    }
    .alert-title {
        font-size: 12px;
    }
    .alert-btn {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2rem 0;
    }
    .footer p {
        font-size: 0.85rem;
    }
    .footer p:last-child {
        font-size: 0.75rem !important;
    }
    
    /* Action Sequence Mobile */
    .action-sequence-box {
        padding: 0.75rem;
    }
    .action-sequence-box h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    .action-steps {
        font-size: 1rem;
        gap: 0.5rem;
    }
    .action-note {
        font-size: 0.85rem;
    }
}

/* Extra Small Devices (up to 360px) */
@media (max-width: 360px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .logo {
        font-size: 1rem;
    }
    .lang-switch {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    .lang-switch svg {
        width: 14px;
        height: 14px;
    }
    .policy-title {
        font-size: 1.3rem;
    }
    .policy-subtitle {
        font-size: 0.85rem;
    }
    .card-title {
        font-size: 1rem;
    }
    .step-num {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    main {
        padding-top: 90px;
    }
    .action-steps {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    .action-sequence-box {
        padding: 0.75rem;
    }
    .action-sequence-box h3 {
        font-size: 1rem;
    }
    .action-note {
        font-size: 0.8rem;
    }
}

/* Prevent Text Overflow */
* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure Images Don't Overflow */
img, svg {
    max-width: 100%;
    height: auto;
}

/* Better Touch Targets for Mobile */
@media (max-width: 767px) {
    .lang-switch {
        min-height: 44px;
        min-width: 44px;
    }
    a, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .policy-card li {
        padding: 0.25rem 0;
    }
}


