:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #fbbf24;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --dark-bg: #0a0e27;
    --dark-surface: #141b3d;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 2.5vw, 16px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #141b3d 50%, #1a1f4d 100%);
    color: #f1f5f9;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.light-mode {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
}

body.light-mode::before {
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
}

/* Navbar */
.navbar {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 4vw, 3rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: clamp(1.1rem, 3.5vw, 1.75rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.5vw, 0.75rem);
    background: linear-gradient(135deg, #818cf8, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    transition: transform 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(0.5rem, 2vw, 3rem);
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: rgba(241, 245, 249, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.7rem, 2vw, 0.95rem);
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

body.light-mode .nav-link {
    color: rgba(30, 41, 59, 0.85);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #818cf8, #fbbf24);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid var(--primary-light);
    color: var(--primary-light);
    width: clamp(38px, 8vw, 50px);
    height: clamp(38px, 8vw, 50px);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.35);
    transform: scale(1.15) rotate(20deg);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Hero */
.hero {
    position: relative;
    min-height: clamp(50vh, 85vh, 100vh);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: visible;
    padding: clamp(1rem, 4vw, 3rem) 0;
}

.hero-background {
    position: absolute;
    width: clamp(250px, 70vw, 600px);
    height: clamp(250px, 70vw, 600px);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 70%);
    border-radius: 50%;
    top: -10%;
    right: -15%;
    animation: float 10s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 clamp(0.75rem, 4vw, 2rem);
    overflow: visible;
}

.hero-title {
    font-size: clamp(1.75rem, 7vw, 5.5rem);
    font-weight: 900;
    margin-bottom: clamp(0.75rem, 3vw, 2rem);
    background: linear-gradient(135deg, #60a5fa 0%, #fbbf24 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: clamp(-2px, -0.3vw, -3px);
    line-height: 1.2;
    animation: fadeInDown 1s ease;
    overflow: visible;
    word-wrap: break-word;
}

body.light-mode .hero-title {
    background: linear-gradient(135deg, #3b82f6, #d97706, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 3.5vw, 1.75rem);
    color: rgba(241, 245, 249, 0.75);
    margin-bottom: clamp(1.5rem, 4vw, 5rem);
    font-weight: 400;
    letter-spacing: -0.5px;
    animation: fadeInUp 1s ease 0.2s both;
    line-height: 1.5;
}

body.light-mode .hero-subtitle {
    color: rgba(30, 41, 59, 0.7);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.4rem, 1.5vw, 1rem);
    animation: bounce 3s ease infinite;
    color: var(--primary-light);
    font-weight: 600;
    font-size: clamp(0.75rem, 2vw, 1rem);
}

/* Sections */
.scanner-section, .learn-section, .flags-section, .protect-section, .emergency-section, .stats-section {
    padding: clamp(2.5rem, 7vw, 8rem) clamp(0.75rem, 4vw, 2rem);
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(1.5rem, 4vw, 5rem);
}

.section-header h2 {
    font-size: clamp(1.5rem, 5.5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: clamp(0.6rem, 2vw, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.6rem, 1.5vw, 1.25rem);
    letter-spacing: clamp(-1px, -0.2vw, -1.5px);
    transition: all 0.3s ease;
    flex-wrap: wrap;
    line-height: 1.3;
}

.section-header h2:hover {
    color: var(--primary-light);
    transform: scale(1.02);
}

.section-header p {
    font-size: clamp(0.9rem, 2.8vw, 1.35rem);
    color: rgba(241, 245, 249, 0.6);
    font-weight: 400;
    line-height: 1.5;
}

body.light-mode .section-header p {
    color: rgba(30, 41, 59, 0.6);
}

/* Glass Effect - ENHANCED */
.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px) saturate(150%);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: clamp(14px, 3.5vw, 28px);
    padding: clamp(1.25rem, 4vw, 3rem);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    word-wrap: break-word;
}

.glass-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

body.light-mode .glass-effect {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

.glass-effect:hover {
    transform: translateY(clamp(-6px, -2.5vw, -20px)) scale(1.02);
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 30px 80px rgba(99, 102, 241, 0.3), 0 0 0 1px rgba(129, 140, 248, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

body.light-mode .glass-effect:hover {
    box-shadow: 0 30px 80px rgba(99, 102, 241, 0.15);
}

/* Scanner Card */
.scanner-card {
    max-width: 900px;
    margin: 0 auto;
}

/* Input wrapper for icon + input */
.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.input-group {
    display: flex;
    gap: clamp(0.6rem, 2.5vw, 1.25rem);
    margin-bottom: clamp(1.25rem, 4vw, 3rem);
    position: relative;
    flex-wrap: wrap;
    align-items: stretch;
}

.input-icon {
    position: absolute;
    left: clamp(0.9rem, 2.5vw, 1.5rem);
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    font-size: clamp(1rem, 2.8vw, 1.5rem);
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.url-input {
    flex: 1;
    min-width: 160px;
    width: 100%;
    padding: clamp(0.85rem, 2.5vw, 1.5rem) clamp(0.8rem, 2.5vw, 1.5rem) clamp(0.85rem, 2.5vw, 1.5rem) clamp(3.2rem, 4.5vw, 5rem);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(10px, 2.5vw, 18px);
    color: #f1f5f9;
    font-size: clamp(0.85rem, 2.2vw, 1.05rem);
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

body.light-mode .url-input {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.15);
    color: #1e293b;
}

.url-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 6px 20px rgba(99, 102, 241, 0.25);
}

body.light-mode .url-input:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 6px 20px rgba(99, 102, 241, 0.15);
}

.url-input::placeholder {
    color: rgba(241, 245, 249, 0.3);
}

body.light-mode .url-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.scan-btn {
    padding: clamp(0.8rem, 2vw, 1.5rem) clamp(1.2rem, 3.5vw, 3rem);
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: clamp(10px, 2.5vw, 18px);
    color: white;
    font-size: clamp(0.8rem, 2vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.3rem, 1.2vw, 0.75rem);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    min-width: fit-content;
}

.scan-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

.scan-btn:active {
    transform: translateY(-3px) scale(1.02);
}

/* Loading */
#loading {
    text-align: center;
    padding: clamp(1.25rem, 4vw, 3rem);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-light);
    width: clamp(45px, 12vw, 70px);
    height: clamp(45px, 12vw, 70px);
    animation: spin 0.8s linear infinite;
    margin: 0 auto clamp(0.8rem, 3vw, 2rem);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.result-content {
    padding: clamp(1.25rem, 4vw, 3rem);
    border-radius: clamp(14px, 3vw, 20px);
    text-align: center;
    animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
}

.result-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

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

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

.result-safe {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.04));
    border-color: var(--success);
    color: #10b981;
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.2);
}

.result-dangerous {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(252, 165, 165, 0.04));
    border-color: var(--danger);
    color: #ef4444;
    box-shadow: 0 15px 50px rgba(239, 68, 68, 0.2);
}

/* History */
.scan-history {
    margin-top: clamp(1.25rem, 4vw, 3.5rem);
    padding-top: clamp(1.25rem, 4vw, 3rem);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.history-label {
    display: flex;
    align-items: center;
    gap: clamp(0.35rem, 1.5vw, 0.75rem);
    margin-bottom: clamp(0.85rem, 2.5vw, 2rem);
    color: var(--primary-light);
    font-weight: 700;
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
}

.history-item {
    padding: clamp(0.75rem, 2vw, 1.25rem) clamp(0.85rem, 2.5vw, 1.5rem);
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(9px, 2.2vw, 14px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-light);
    transition: all 0.3s ease;
    margin-bottom: clamp(0.4rem, 1.5vw, 1rem);
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
    word-wrap: break-word;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

/* Info Grid */
.info-grid, .protect-grid, .flags-grid, .stats-grid, .emergency-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 70vw, 350px), 1fr));
    gap: clamp(1.25rem, 3.5vw, 3rem);
}

.info-icon {
    width: clamp(55px, 12vw, 80px);
    height: clamp(55px, 12vw, 80px);
    margin: 0 auto clamp(0.85rem, 2.5vw, 2rem);
    border-radius: clamp(12px, 2.5vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
}

.info-icon.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.info-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.info-icon.info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.info-card h3, .protect-card h3 {
    font-size: clamp(1rem, 2.8vw, 1.5rem);
    margin-bottom: clamp(0.6rem, 1.5vw, 1.25rem);
    font-weight: 800;
    line-height: 1.3;
}

/* Flag Items */
.flag-item {
    position: relative;
    padding-left: clamp(3.5rem, 10vw, 6rem);
    overflow: visible;
    word-wrap: break-word;
}

.flag-number {
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(45px, 10vw, 60px);
    height: clamp(45px, 10vw, 60px);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: clamp(10px, 2.2vw, 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: white;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.flag-item:hover .flag-number {
    transform: scale(1.2) rotate(8deg);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

.flag-item h4 {
    font-size: clamp(0.95rem, 2.5vw, 1.35rem);
    margin-bottom: clamp(0.4rem, 1.5vw, 1rem);
    color: var(--primary-light);
    font-weight: 800;
    word-wrap: break-word;
    line-height: 1.3;
}

.flag-item code {
    display: block;
    padding: clamp(0.65rem, 1.8vw, 1rem) clamp(0.75rem, 1.8vw, 1.25rem);
    background: rgba(0, 0, 0, 0.3);
    border-radius: clamp(7px, 2vw, 12px);
    margin: clamp(0.4rem, 1.5vw, 0.75rem) 0;
    font-family: 'Monaco', 'Courier New', monospace;
    border-left: 4px solid var(--primary-light);
    font-weight: 600;
    font-size: clamp(0.7rem, 1.8vw, 0.9rem);
    word-break: break-all;
    white-space: pre-wrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

body.light-mode .flag-item code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.flag-item p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Protect Cards */
.protect-icon {
    width: clamp(50px, 10vw, 70px);
    height: clamp(50px, 10vw, 70px);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: clamp(12px, 2.5vw, 18px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    color: white;
    margin-bottom: clamp(0.85rem, 2.5vw, 2rem);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.protect-card:hover .protect-icon {
    transform: scale(1.2) rotate(-10deg);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

.protect-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(0.65rem, 1.8vw, 1rem);
}

.protect-card li {
    padding-left: clamp(1.3rem, 2.8vw, 2rem);
    position: relative;
    line-height: 1.7;
    word-wrap: break-word;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.protect-card li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 900;
    font-size: clamp(0.9rem, 2.2vw, 1.3rem);
}

/* Stats */
.stat-number {
    font-size: clamp(1.75rem, 5.5vw, 3.5rem);
    font-weight: 900;
    color: var(--primary-light);
    margin-bottom: clamp(0.4rem, 1.5vw, 1rem);
    letter-spacing: -2px;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.stat-card:hover .stat-number {
    color: var(--accent);
    transform: scale(1.15);
}

.stat-card p {
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Footer */
.footer {
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(1.5rem, 4vw, 5rem) clamp(0.75rem, 4vw, 2rem) clamp(0.75rem, 2.5vw, 2rem);
    margin-top: clamp(3rem, 7vw, 8rem);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 70vw, 300px), 1fr));
    gap: clamp(1.5rem, 3.5vw, 4rem);
    margin-bottom: clamp(1.5rem, 3.5vw, 4rem);
}

.footer-section h4 {
    color: var(--primary-light);
    margin-bottom: clamp(0.8rem, 1.8vw, 2rem);
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    font-weight: 800;
}

.footer-section h4 i {
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: clamp(1.25rem, 2.5vw, 3rem);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(241, 245, 249, 0.4);
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    line-height: 1.5;
}

.hidden { display: none !important; }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(40px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* Mobile Optimization (0px - 768px) */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .section-container,
    .nav-container,
    .hero-content,
    .scanner-card,
    .glass-effect,
    .info-grid,
    .protect-grid,
    .flags-grid,
    .stats-grid,
    .emergency-steps {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Navbar */
    .nav-container {
        padding: 0 0.75rem;
        gap: 0.3rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 0.15rem 0.25rem;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 0.75rem 0 0.25rem;
    }

    .hero-content {
        padding: 0.25rem 0.9rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.9rem;
    }

    .scroll-indicator {
        font-size: 0.7rem;
        margin-top: 0.15rem;
    }

    /* Hero background circle */
    .hero-background {
        width: 200px;
        height: 200px;
        top: -80px;
        right: -40px;
        max-width: 100%;
    }

    /* Scanner section */
    .scanner-section {
        margin-top: 0;
        padding: 0.75rem 0.75rem 1.75rem;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.35rem;
        gap: 0.4rem;
        display: flex;
        flex-direction: column;
    }

    .section-header h2 i {
        font-size: 1rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    /* MOBILE INPUT FIX - ICON PERFECTLY CENTERED */
    .input-wrapper {
        position: relative;
        width: 100%;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        margin-bottom: 1.25rem;
        position: relative;
    }

    .input-icon {
        position: absolute;
        left: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1rem;
        width: 24px;
        height: 24px;
        z-index: 10;
        pointer-events: none;
    }

    .url-input {
        width: 100%;
        padding: 0.85rem 0.8rem 0.85rem 2.8rem;
        font-size: 0.9rem;
        line-height: 1.4;
        box-sizing: border-box;
    }

    .scan-btn {
        width: 100%;
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .info-grid, .protect-grid, .flags-grid, .stats-grid, .emergency-steps {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .glass-effect {
        padding: 1rem;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
        transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    }

    .glass-effect:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
    }

    .flag-item {
        padding-left: 3.5rem;
    }

    .flag-number {
        width: 45px;
        height: 45px;
        font-size: 0.95rem;
    }

    .flag-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .flag-item code {
        padding: 0.6rem 0.75rem;
        font-size: 0.7rem;
        margin: 0.4rem 0;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-card p {
        font-size: 0.85rem;
    }

    .protect-card ul {
        gap: 0.6rem;
    }

    .protect-card li {
        padding-left: 1.3rem;
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 1.25rem;
    }
}

/* Extra small devices (480px and below) */
@media (max-width: 480px) {
    .input-icon {
        left: 0.6rem;
        font-size: 0.95rem;
        width: 20px;
        height: 20px;
    }

    .url-input {
        padding: 0.8rem 0.7rem 0.8rem 2.6rem;
        font-size: 0.85rem;
    }
}

/* Tiny devices (360px and below) */
@media (max-width: 360px) {
    .nav-brand {
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: 1.3rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .section-header h2 {
        font-size: 1.15rem;
    }

    .input-icon {
        left: 0.5rem;
        font-size: 0.9rem;
        width: 18px;
        height: 18px;
    }

    .url-input {
        padding: 0.75rem 0.65rem 0.75rem 2.4rem;
        font-size: 0.8rem;
    }

    .flag-number {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .scan-btn {
        padding: 0.75rem 0.85rem;
        font-size: 0.8rem;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 40vh;
    }

    .hero-title {
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        margin-bottom: 0.75rem;
        font-size: 0.95rem;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    .glass-effect:hover {
        transform: none;
    }

    .nav-link::after {
        display: none;
    }

    button, a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Single positioning context */
.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Icon: one source of truth */
.input-icon {
    position: absolute;
    left: 1rem !important;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
    line-height: 1;
}

/* Input padding synced with icon */
.url-input {
    padding-left: 3rem !important;
}

/* Mobile layout only — NO icon movement */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    .scan-btn {
        width: 100%;
    }
}

