@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0066ff;
    --primary-hover: #0052cc;
    --secondary-color: #6c757d;
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #2d3748;
    --text-sub: #718096;
    --border-radius: 16px;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --input-bg: #f7fafc;
    --input-border: #e2e8f0;
    --accent-red: #e53e3e;
    --accent-green: #38a169;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Layout & Banners --- */
.ad-banner {
    width: 100%;
    padding: 10px;
    display: flex;
    justify-content: center;
    background: transparent;
}

.ad-placeholder {
    background: #cbd5e0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.top-banner .ad-placeholder,
.bottom-banner .ad-placeholder {
    width: 728px;
    height: 90px;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    /* Center everything grouping ads close to box */
    gap: 15px;
    /* Tight gap */
    padding: 20px 10px;
    max-width: 1400px;
    /* Reduced max-width to keep things together */
    margin: 0 auto;
    width: 100%;
}

.sidebar-ad {
    width: 160px;
    padding-top: 40px;
    flex-shrink: 0;
}

.sidebar-ad .ad-placeholder {
    width: 160px;
    height: 600px;
    position: sticky;
    top: 100px;
    /* Sticky top offset */
}

.left-sidebar {
    order: 1;
}

.center-content {
    order: 2;
}

.right-sidebar {
    order: 3;
}

/* Hide sidebars on smaller screens */
@media (max-width: 1100px) {
    .sidebar-ad {
        display: none;
    }

    .main-content {
        max-width: 800px;
    }
}

.center-content {
    flex: 1;
    max-width: 1000px;
    /* Make Search Box BIGGER */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- Search Card --- */
.search-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.main-logo {
    font-size: 3rem;
    background: -webkit-linear-gradient(45deg, #0066ff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* --- Vehicle Selector --- */
.vehicle-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.vehicle-option {
    cursor: pointer;
    position: relative;
}

.vehicle-option input {
    display: none;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 90px;
    background: #fff;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-sub);
    transition: all 0.3s ease;
}

.option-content i {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.option-content span {
    font-size: 0.85rem;
    font-weight: 500;
}

.vehicle-option:hover .option-content {
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.vehicle-option.active .option-content {
    border-color: var(--primary-color);
    background: #ebf8ff;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

/* --- Inputs (Floating Label) --- */
.form-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    padding-top: 24px;
    padding-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.input-group label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.input-group input:not(:placeholder-shown)+label,
.input-group input:focus+label {
    top: 12px;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e0;
}

/* --- Captcha Row --- */
.captcha-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.captcha-row .input-group {
    flex: 1;
}

.captcha-display {
    position: relative;
    width: 140px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--input-border);
    transition: all 0.2s;
}

#captchaImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Shrink to fit */
    background: #f7fafc;
    /* Match input bg for gaps */
}

.refresh-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.refresh-overlay i {
    color: #fff;
    font-size: 1.5rem;
}

.captcha-display:hover .refresh-overlay {
    opacity: 1;
}

/* --- Button --- */
.btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* --- Loading Spinner --- */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Result Card Styling --- */
.result-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    animation: slideUp 0.4s ease-out;
}

.result-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.result-card.success .result-header {
    background: #f0fff4;
}

.result-card.success .result-icon {
    color: var(--accent-green);
    font-size: 1.5rem;
}

.result-card.success h3 {
    color: #22543d;
    margin: 0;
}

.result-card.error .result-header {
    background: #fff5f5;
}

.result-card.error .result-icon {
    color: var(--accent-red);
    font-size: 1.5rem;
}

.result-card.error h3 {
    color: #742a2a;
    margin: 0;
}

.result-body {
    padding: 25px;
}

/* Injected CSGT Content Styling - Modern Table */
.csgt-content {
    font-size: 0.95rem;
    color: var(--text-main);
}

.csgt-content .row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #edf2f7;
}

.csgt-content .row:last-child {
    border-bottom: none;
}

.csgt-content .col-md-3 {
    flex: 0 0 35%;
    font-weight: 600;
    color: var(--text-sub);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding-right: 15px;
}

.csgt-content .col-md-9 {
    flex: 1;
    color: #2d3748;
    font-weight: 500;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: slideUp 0.6s ease-out;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 15px;
    }

    .sidebar-ad {
        display: none;
    }

    .top-banner .ad-placeholder {
        width: 100%;
        max-width: 100%;
        height: 60px;
    }

    .search-card {
        padding: 25px;
    }

    .captcha-row {
        flex-direction: column;
    }

    .captcha-display {
        width: 100%;
        height: 60px;
    }

    .csgt-content .row {
        flex-direction: column;
        gap: 5px;
    }

    .csgt-content .col-md-3 {
        width: 100%;
    }
}

.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-top: auto;
}

/* SEO Content Section */
.seo-content {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.seo-content h2 {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 15px;
    margin-top: 0;
}

.seo-content h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-top: 25px;
    margin-bottom: 10px;
}

.seo-content p,
.seo-content li {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.seo-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.seo-content strong {
    color: #2c5282;
}

/* --- Main Header Styles --- */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.header-logo img {
    height: 90px;
    width: auto;
    display: block;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.header-nav a:hover {
    color: #fca120;
    /* Brand Yellow/Orange */
}

/* Submenu - Mega Menu Style (Grid) */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: -100px;
    background: #fff;
    min-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 25px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;

    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1100;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.submenu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    font-size: 0.95rem;
    color: #4a5568 !important;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: left;
    height: 100%;
    background: transparent;
}

.submenu a:hover {
    background: #fff8eb;
    color: #fca120 !important;
    transform: translateX(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Add a small arrow pointing up */
.submenu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 140px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-cta {
    background: #fca120;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px rgba(252, 161, 32, 0.3);
}

.btn-cta:hover {
    background: #e5901a;
    transform: translateY(-2px);
}

/* --- Main Footer Styles --- */
.main-footer {
    background: #fff;
    padding: 60px 20px;
    margin-top: auto;
    border-top: 1px solid #eee;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    color: #333;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
    /* Space for arrow icon if needed */
    transition: all 0.2s;
}

.footer-col a::before {
    content: "➥";
    position: absolute;
    left: 0;
    color: #fca120;
    font-size: 0.7rem;
    top: 2px;
}

.footer-col a:hover {
    color: #fca120;
    padding-left: 25px;
}

.footer-qr img {
    max-width: 150px;
    height: auto;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 8px;
}

.footer-disclaimer {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
    text-align: center;
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.6;
}

.footer-disclaimer p {
    margin-bottom: 5px;
}

.footer-disclaimer strong {
    color: #4a5568;
}

/* Responsive */
@media (max-width: 900px) {
    .header-nav {
        display: none;
    }

    .header-cta {
        display: none;
    }

    .header-container {
        justify-content: center;
    }

    .footer-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-col {
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
        padding-bottom: 20px;
    }
}

/* --- AdBlock Modal --- */
.adblock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Dark overlay */
    z-index: 9999;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.adblock-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.adblock-icon {
    font-size: 4rem;
    color: #e53e3e;
    /* Red color */
    margin-bottom: 20px;
}

.adblock-content h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 15px;
}

.adblock-content p {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Status Badge for CSGT Results --- */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid currentColor;
    white-space: nowrap;
}

.status-badge.success {
    color: var(--accent-green);
    background-color: rgba(56, 161, 105, 0.1);
    border-color: var(--accent-green);
}

.status-badge.warning {
    color: var(--accent-red);
    background-color: rgba(229, 62, 62, 0.1);
    border-color: var(--accent-red);
}