/* ============================================
   IP TRACKER - PREMIUM DESIGN SYSTEM
   French "Win Offer" Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

:root {
    /* French flag colors */
    --fr-blue: #002395;
    --fr-white: #FFFFFF;
    --fr-red: #ED2939;

    /* Premium palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent-gold: #f59e0b;
    --accent-rose: #f43f5e;

    /* Surfaces */
    --bg-dark: #0f0f23;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.12);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --text-dark: #1e293b;
    --text-dark-secondary: #64748b;

    /* Misc */
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

.landing-body {
    background: linear-gradient(135deg, #0c0c1d 0%, #1a1a3e 30%, #0d0d2b 60%, #141430 100%);
    color: var(--text-primary);
    position: relative;
}

/* Animated background particles */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-particles::before,
.bg-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.bg-particles::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-particles::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.1), transparent 70%);
    bottom: 10%;
    right: -10%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* French flag stripe at top */
.fr-stripe {
    height: 5px;
    background: linear-gradient(90deg, var(--fr-blue) 33.33%, var(--fr-white) 33.33%, var(--fr-white) 66.66%, var(--fr-red) 66.66%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Main container */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-gold);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: slideDown 0.8s ease-out;
}

.hero-badge .flag {
    font-size: 18px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideDown 0.8s ease-out 0.1s both;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
    animation: slideDown 0.8s ease-out 0.2s both;
}

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

/* Offer highlights */
.offer-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px 0;
    animation: fadeIn 1s ease-out 0.4s both;
}

.highlight-card {
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 24px 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-glow);
}

.highlight-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.highlight-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-card .value {
    font-size: 20px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--accent-gold);
}

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

/* Form card */
.form-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 40px;
    backdrop-filter: blur(20px);
    animation: slideUp 0.8s ease-out 0.5s both;
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fr-blue), var(--primary), var(--fr-red));
}

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

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Form fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(0);
}

/* Success message */
.success-message {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
    animation: slideDown 0.5s ease-out;
}

.success-message .icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

.success-message h3 {
    color: #22c55e;
    font-size: 18px;
    margin-bottom: 4px;
}

.success-message p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer */
.landing-footer {
    text-align: center;
    padding: 40px 0 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.landing-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

/* Timer / urgency */
.urgency-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 32px;
    animation: pulse 2s ease-in-out infinite;
}

.urgency-bar .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-rose);
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.1); }
    50% { box-shadow: 0 0 20px 0 rgba(244, 63, 94, 0.08); }
}

.urgency-bar span {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-rose);
}

.urgency-bar .timer {
    font-family: 'Inter', monospace;
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 16px;
}

/* ============================================
   ADMIN PAGE STYLES
   ============================================ */

.admin-body {
    background: #0a0a1a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Login */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    text-align: center;
}

.login-card .lock-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-card input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 4px;
}

.login-card input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.login-card .btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.error-msg {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: #f87171;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Dashboard */
.dashboard {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.dash-header h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-header h1 .icon {
    font-size: 28px;
}

.dash-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Stats cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Data table */
.table-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: rgba(255, 255, 255, 0.04);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    vertical-align: top;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.06);
}

.data-table .ip-cell {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.data-table .location-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-table .location-cell .country {
    font-weight: 600;
    color: #e2e8f0;
}

.data-table .location-cell .detail {
    font-size: 12px;
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-data .icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

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

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .hero {
        padding: 40px 0 24px;
    }

    .offer-highlights {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-card {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}
