/* ========================================
   Facebook Link Cloaker — Main Stylesheet
   ======================================== */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f2f5; color: #333; }

/* ========================================
   Auth Pages (Login / Register)
   ======================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
}

.auth-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-logo {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.auth-box h2 {
    text-align: center;
    color: #555;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 25px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-link a { color: #2563eb; text-decoration: none; font-weight: 600; }

/* ========================================
   Navbar
   ======================================== */
.navbar {
    background: #1e3a5f;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-brand {
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    background: rgba(255,255,255,0.15);
}

.btn-logout {
    color: #ff6b6b !important;
    border: 1px solid rgba(255,107,107,0.4) !important;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.container h1 {
    font-size: 24px;
    color: #1e3a5f;
    margin-bottom: 25px;
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: white;
    text-align: center;
}

.stat-card.blue   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-card.green  { background: linear-gradient(135deg, #059669, #047857); }
.stat-card.teal   { background: linear-gradient(135deg, #0891b2, #0e7490); }
.stat-card.red    { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.stat-icon   { font-size: 28px; margin-bottom: 8px; }
.stat-number { font-size: 32px; font-weight: 700; }
.stat-label  { font-size: 13px; opacity: 0.85; margin-top: 4px; }

/* ========================================
   Cards
   ======================================== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h2 {
    font-size: 16px;
    color: #1e3a5f;
    font-weight: 600;
}

/* ========================================
   Tables
   ======================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    color: #444;
    vertical-align: middle;
}

.table tr:hover td { background: #fafbff; }
.url-truncate { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.short-url {
    color: #2563eb;
    font-size: 13px;
    font-family: monospace;
}

.view-all {
    display: block;
    text-align: center;
    padding: 15px;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge.green { background: #dcfce7; color: #166534; }
.badge.red   { background: #fee2e2; color: #991b1b; }

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f8fafc;
    color: #444;
    transition: all 0.2s;
}

.btn:hover { background: #e2e8f0; }

.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover { background: #1d4ed8; }

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.btn-sm { padding: 5px 10px; font-size: 12px; margin: 0 2px; }

.btn-block {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 15px;
}

.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 4px;
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
}

.form-group small { color: #888; font-size: 12px; display: block; margin-top: 4px; }
.required { color: red; }

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.alert-error   { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ========================================
   Generated URL Box
   ======================================== */
.generated-url {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.generated-url input {
    flex: 1;
    padding: 10px;
    border: 2px solid #2563eb;
    border-radius: 8px;
    font-size: 14px;
    background: #eff6ff;
    font-family: monospace;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar { padding: 0 15px; }
    .nav-links a { margin-left: 8px; padding: 6px 8px; font-size: 12px; }
    .container { padding: 0 12px; }
    .table { font-size: 12px; }
    .table th, .table td { padding: 10px 10px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-box { margin: 20px; padding: 25px; }
}
