/* Scommessa Intelligente - Value Bets */

:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #22263a;
    --bg-header: #141720;
    --border: #2a2e3f;
    --text: #e4e6f0;
    --text-muted: #8b8fa3;
    --primary: #4f8cff;
    --primary-hover: #3a75e8;
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.12);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Lang Toggle */
.lang-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-btn {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--primary);
    color: #fff;
}

/* User badge */
.user-badge {
    background: var(--bg-card);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    border: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-sm {
    padding: 5px 14px;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-card);
    color: var(--text);
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.section-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header .section-title {
    margin-bottom: 0;
}

/* Date Selector */
.date-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-selector label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.date-selector input[type="date"] {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
}

.date-selector input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(42, 46, 63, 0.5);
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Accuracy table */
.accuracy-table {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.accuracy-pct {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.accuracy-pct.good {
    color: var(--green);
    background: var(--green-bg);
}

.accuracy-pct.ok {
    color: var(--yellow);
    background: var(--yellow-bg);
}

.accuracy-pct.bad {
    color: var(--red);
    background: var(--red-bg);
}

/* Sport Card */
.sport-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sport-card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.push-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.sport-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.sport-icon {
    margin-right: 6px;
}

/* Bets table */
.bets-table {
    font-size: 0.8rem;
}

.bets-table th {
    padding: 8px 8px;
    font-size: 0.7rem;
}

.bets-table td {
    padding: 8px 8px;
    vertical-align: middle;
}

.fw-600 {
    font-weight: 600;
}

.mono {
    font-variant-numeric: tabular-nums;
}

.edge {
    color: var(--green);
    font-weight: 600;
}

.league-tag {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-won {
    color: var(--green);
    background: var(--green-bg);
}

.badge-lost {
    color: var(--red);
    background: var(--red-bg);
}

.badge-pending {
    color: var(--yellow);
    background: var(--yellow-bg);
}

.pick-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.12);
    white-space: nowrap;
}

.market-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ce93d8;
    background: rgba(206, 147, 216, 0.12);
    white-space: nowrap;
}

/* No bets message */
.no-bets {
    padding: 30px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-bets.coming-soon {
    color: var(--yellow);
}

.clock-icon {
    font-size: 1.2rem;
    margin-right: 6px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Text helpers */
.text-muted {
    color: var(--text-muted);
}

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

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-form .btn {
    width: 100%;
    padding: 11px;
    font-size: 1rem;
    margin-top: 6px;
}

/* Registration links */
.login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Pricing info box */
.pricing-info {
    text-align: center;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(79, 140, 255, 0.08);
    border: 1px solid rgba(79, 140, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* PayPal return pages */
.return-card {
    text-align: center;
    padding: 20px 0;
}

.return-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--green);
}

.return-icon.cancel {
    color: var(--red);
}

.return-card h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

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

.return-card .btn {
    margin-top: 8px;
}

/* Inline Register CTA Card (index.php when accuracy hidden) */
.inline-register-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px 40px;
    max-width: 440px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.inline-register-card .login-header {
    margin-bottom: 16px;
}

.inline-register-card .section-title {
    font-size: 1.2rem;
    color: var(--primary);
}

.cta-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cta-btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    text-align: center;
}

/* PayPal Button Container */
#paypal-button-container {
    margin-top: 16px;
    min-height: 45px;
}

@media (max-width: 640px) {
    .inline-register-card {
        padding: 28px 20px;
    }
}

/* Subscription Info Card */
.sub-info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sub-info-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.sub-info-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sub-info-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.sub-cancel-area {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sub-cancel-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-cancel {
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-cancel:hover {
    background: var(--red-bg);
    color: var(--red);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

.footer-links {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Compact footer for login/register pages */
.footer-compact {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 16px;
}

.footer-compact .footer-links {
    margin-top: 4px;
}

/* Legal Modal */
.legal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.legal-overlay.active {
    display: flex;
}

.legal-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.legal-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.legal-modal-header .legal-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 10px;
}

.legal-modal-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    flex-shrink: 0;
}

.legal-modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.legal-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.7;
    font-size: 0.85rem;
    color: var(--text);
}

.legal-modal-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 22px;
    margin-bottom: 8px;
}

.legal-modal-body h3:first-child {
    margin-top: 0;
}

.legal-modal-body p {
    margin-bottom: 12px;
    color: var(--text);
}

.legal-modal-body a {
    color: var(--primary);
    text-decoration: none;
}

.legal-modal-body a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .legal-modal {
        max-height: 90vh;
    }

    .legal-modal-header {
        padding: 16px 18px 12px;
    }

    .legal-modal-body {
        padding: 16px 18px 20px;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header {
        flex-direction: column;
    }

    .date-selector {
        width: 100%;
    }

    .table {
        font-size: 0.82rem;
    }

    .table th, .table td {
        padding: 8px 8px;
    }

    .login-card {
        padding: 30px 24px;
    }
}
