:root {
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --success-color: #10b981;
    --border-color: #e5e7eb;
    
    /* Social Colors */
    --ig-color: #e1306c;
    --tt-color: #000000;
    --sc-color: #fffc00;
    --fb-color: #1877f2;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-gradient);
    z-index: -1;
}

/* Ad Layout Structure */
.ad-layout-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    gap: 20px;
}

.main-content-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    gap: 20px;
}

.app-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
    min-height: 600px; /* Space for the screens to transition */
}

/* Ad Placeholders */
.ad-banner, .ad-sidebar {
    background: rgba(255, 255, 255, 0.4);
    border: 1px dashed #9ca3af;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 5px;
    font-size: 0.65rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
}

.ad-placeholder {
    color: #9ca3af;
    font-weight: 600;
    font-size: 1.2rem;
}

.top-ad, .bottom-ad {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.left-ad, .right-ad, .left-ad-2, .right-ad-2 {
    width: 160px;
    min-height: 280px;
    flex: 1;
}

/* Ad columns: two sidebars side by side on desktop */
.ad-column {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-shrink: 0;
}

/* Screens */
.screen {
    width: 100%;
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    visibility: hidden;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    position: relative;
}

/* Card Style */
.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 20px 48px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 100%;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Animations */
.fade-in { animation: fadeIn 0.5s ease-out forwards; }
.slide-up { animation: slideUp 0.4s ease-out forwards; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Language Selection */
.logo-container {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.lang-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lang-btn {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
}

.lang-btn:hover, .lang-btn:active {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.lang-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 3px 6px;
    margin-right: 8px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Platform Selection */
.platform-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.2s, opacity 0.2s;
}

.social-btn:hover, .social-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.social-btn i { font-size: 1.4rem; }

.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.tiktok { background: #000000; }
.snapchat { background: #fffc00; color: #000; }
.facebook { background: #1877f2; }
.twitter { background: #000000; }

/* Support Screen */
.heart-icon-large {
    font-size: 3.5rem;
    color: #ef4444;
    margin-bottom: 16px;
    animation: heartBeat 2s infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

.support-text-box {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.support-text-box p {
    font-size: 0.9rem;
    color: #881337;
    margin-bottom: 12px;
    line-height: 1.5;
}

.support-text-box p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    text-align: center;
}

/* Username Input Screen */
.back-nav {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    align-self: flex-start;
    width: 100%;
}

.back-nav:hover { color: var(--text-main); }

.platform-icon-large {
    font-size: 3rem;
    margin-bottom: 16px;
}
.platform-icon-large.instagram { color: var(--ig-color); }
.platform-icon-large.tiktok { color: var(--tt-color); }
.platform-icon-large.snapchat { color: #d4d100; }
.platform-icon-large.facebook { color: var(--fb-color); }
.platform-icon-large.twitter { color: #000000; }

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.at-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.1rem;
}

#target-username {
    width: 100%;
    background: #f3f4f6;
    border: 2px solid transparent;
    padding: 16px 16px 16px 40px;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

#target-username:focus {
    background: #ffffff;
    border-color: var(--primary-color);
}

.input-error {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: -16px;
    margin-bottom: 20px;
    text-align: left;
    padding-left: 8px;
    animation: fadeIn 0.3s;
}
.input-error.hidden {
    display: none;
}

.primary-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.2s;
}

.primary-btn:hover, .primary-btn:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

/* Queue & Progress Screen */
.scanning-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.scan-circle {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.scan-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: var(--primary-color);
}

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

.progress-container {
    margin-bottom: 24px;
}

.progress-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease-out;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

.queue-info-box {
    display: flex;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.queue-stat {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 16px;
}

.queue-stat .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.queue-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.ad-strategy-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.ad-badge {
    position: absolute;
    top: 0; left: 0;
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-bottom-right-radius: 8px;
}

.ad-strategy-box p {
    font-size: 0.9rem;
    color: #92400e;
    margin: 12px 0 16px;
    line-height: 1.4;
}

.action-btn {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:active {
    transform: scale(0.96);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.success-msg {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.success-msg.hidden { display: none; }

.warning-text-small {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #ef4444;
    font-weight: 500;
}

.warning-text-small i {
    margin-right: 4px;
}

/* Error Screen */
.error-icon-large {
    font-size: 3.5rem;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.5;
}

.privacy-tip {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    margin-bottom: 24px;
}

.privacy-tip i {
    color: #6b7280;
    margin-top: 2px;
}

.secondary-btn {
    width: 100%;
    background: #f3f4f6;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.secondary-btn:hover { background: #e5e7eb; }

/* AD MODAL STYLES */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-card {
    background: #fff;
    width: 100%;
    max-width: 600px;
    min-height: 400px;
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: -15px; right: -15px;
    background: #fff;
    border: none;
    width: 35px; height: 35px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.2s;
}

.close-btn:hover { color: #ef4444; }
.close-btn.hidden { display: none; }

.modal-card h3 {
    color: #111827;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.modal-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.fake-ad-box {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fake-ad-box:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.fake-ad-box i {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 10px;
    display: block;
}

.fake-ad-box span {
    font-weight: 700;
    color: #374151;
}

.fake-ad-box small {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 5px;
}

.modal-countdown {
    font-size: 0.85rem !important;
    font-weight: 600;
    color: #4b5563 !important;
    margin-bottom: 0 !important;
}

.modal-error {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 15px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 8px;
}
.modal-error.hidden { display: none; }

.modal-verifying {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 15px;
}
.modal-verifying.hidden { display: none; }

/* FULLSCREEN INTERSTITIAL AD */
.interstitial {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.interstitial.hidden { display: none; }

.interstitial-inner {
    background: #111827;
    border: 1px solid #374151;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    position: relative;
    box-shadow: 0 0 80px rgba(79, 70, 229, 0.3);
}

.interstitial-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid #374151;
    padding: 3px 10px;
    border-radius: 4px;
    align-self: flex-start;
}

.interstitial-ad-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    width: 100%;
    padding: 60px;
    border-radius: 12px;
    border: 2px dashed #374151;
    margin: 16px 0;
    transition: border-color 0.2s, background 0.2s;
}

.interstitial-ad-box:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.interstitial-ad-box i {
    font-size: 5.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.interstitial-ad-box p {
    font-size: 2.8rem;
    font-weight: 800;
    color: #f9fafb;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.interstitial-ad-box small {
    color: #9ca3af;
    font-size: 1.2rem;
}

.interstitial-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.interstitial-footer span {
    color: #6b7280;
    font-size: 0.9rem;
}

.interstitial-close {
    background: #374151;
    color: #f9fafb;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.interstitial-close:hover { background: #4b5563; }
.interstitial-close.hidden { display: none !important; }

/* ============================================
   LIVE COUNTER BADGE
   ============================================ */
.live-counter-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease-out;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulseLiveDot 2s infinite;
}

@keyframes pulseLiveDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 768px) {
    .live-counter-badge {
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    /* On mobile, hide the column wrappers and show sidebars as a horizontal row */
    .main-content-row {
        flex-direction: column;
        align-items: center;
    }

    .ad-column {
        width: 100%;
        flex-direction: row;  /* side by side banners */
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .left-ad, .right-ad, .left-ad-2, .right-ad-2 {
        width: calc(50% - 8px);
        min-height: 100px;
        min-width: 140px;
    }

    .ad-placeholder.vertical {
        font-size: 0.85rem;
    }

    .app-wrapper {
        width: 100%;
        max-width: 420px;
    }

    .top-ad, .bottom-ad {
        max-width: 100%;
    }
}
