/* ========== Temel / Global ========== */
:root {
    --bg-light: #f4f7f6;
    --text-dark: #121212;
    --brand: #E95428;
    /* Updated Brand Color */
    --brand-hover: #fa6a3e;
    --muted: #888;
    --card-border: #222;
    --card-bg: #151517;
    --btn-bg: #1f2024;
    --btn-border: #2a2b30;
    --nav-bg: #000;
    --nav-text: #888;
    --nav-active: #fff;
    --surface-3: #2a2b30;
    /* Added fallback */
    --text-subtle: #888;
    /* Added fallback */
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #000;
    /* Dark mode default */
    color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    text-align: center;
    padding-bottom: 80px;
    /* Space for bottom nav */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

/* ========== Navbar (Desktop) ========== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    padding: 1rem 2rem;
    border-bottom: 1px solid #222;
}

.navbar .brand {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--brand);
}

.navbar .nav-links a {
    color: #ccc;
    margin-left: 1.5rem;
    font-weight: 500;
}

.navbar .nav-links a:hover {
    color: #fff;
}

/* ========== Flash Mesajları ========== */
.flash-messages {
    padding: 0;
    margin: 0;
    list-style: none;
}

.flash-messages li {
    padding: 1rem;
    margin: 1rem 2rem;
    border-radius: 8px;
    color: #fff;
    background-color: var(--brand);
    text-align: center;
}

/* ========== Mobile Bottom Navigation ========== */
.mobile-bottom-nav {
    display: none;
    /* Hidden on desktop by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #333;
    padding: 10px 0 20px 0;
    /* Extra padding for iOS home indicator */
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--nav-text);
    font-size: 10px;
    gap: 4px;
}

.nav-item.active {
    color: var (--nav-active);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ========== General Components ========== */
.btn-wide {
    display: block;
    text-align: center;
    padding: 16px;
    border-radius: 16px;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-wide:active {
    transform: scale(0.98);
}

.btn-1 {
    background: var(--brand);
    border: none;
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: var(--surface-3);
    color: var(--text-subtle);
}

.rank-badge.rank-1 {
    background: var(--brand);
    color: white;
}

.btn-2,
.btn-3 {
    background: #232427;
    border: 1px solid #2a2b30;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subtle {
    font-size: 12px;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .navbar {
        display: none;
        /* Hide desktop navbar on mobile */
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .container {
        padding: 20px 16px 100px 16px;
        /* Bottom padding for nav */
    }

    .profile-wrap {
        padding-bottom: 100px;
    }
}

/* ========== Profile Layout ========== */
.profile-wrap {
    min-height: 100vh;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: center;
}

.profile-inner {
    width: 100%;
    max-width: 600px;
    padding: 24px;
}

.profile-header {
    margin-bottom: 32px;
}

.profile-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.1;
}

.profile-header .lead {
    color: #888;
    font-size: 16px;
    margin: 0;
}

.coach-card {
    background: #1A1A1A;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    border: 1px solid #333;
}

.coach-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
}

.coach-bubble {
    flex: 1;
}

.coach-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: #fff;
}

.coach-text {
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
}

/* ========== CTA Row ========== */
.cta-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.cta-row .btn-wide {
    flex: 1;
    width: auto;
    /* Allow buttons to share spaced row */
}

/* Ensure secondary buttons look correct */
.btn-2 {
    background: #232427;
    border: 1px solid #2a2b30;
}

/* ========== NBA Roster Card ========== */
.nba-roster-card {
    background: linear-gradient(135deg, #1a1c20 0%, #0f1012 100%);
    border: 1px solid #333;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
}

.nba-card-header {
    background: var(--brand);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nba-card-body {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.team-logo-wrapper {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.team-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.team-details {
    flex: 1;
}

.team-name-large {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.team-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 12px;
}

.meta-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

.meta-value {
    font-size: 14px;
    color: #ddd;
    font-weight: 500;
}

/* ========== Athlete History Table Fixes ========== */
.table td,
.table th {
    vertical-align: middle;
    padding: 12px 16px;
}

/* Ensure the first column (Set/Recommendation) takes appropriate width but doesn't squeeze */
.table td:first-child {
    width: auto;
    min-width: 150px;
    white-space: normal;
    vertical-align: top;
}

/* Stats column */
.table td.text-end:nth-last-child(2) {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
}

/* Action column (last) */
.table td:last-child {
    width: 80px;
    min-width: 80px;
    white-space: nowrap;
    text-align: right;
}

/* Fix for the card layout in history */
.basic-list-group .list-group-item {
    background-color: var(--card-bg);
    border-color: var(--card-border);
}

.table-responsive {
    overflow-x: auto;
}

/* Light mode overrides inside table for better contrast if needed */
@media (prefers-color-scheme: light) {

    .table td strong.text-black,
    .table td h6.text-black {
        color: #000 !important;
    }
}

/* ========== Custom Vanilla Modal (Premium) ========== */
.v-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.v-modal.show {
    display: flex;
    opacity: 1;
}

.v-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.v-modal.show .v-modal-content {
    transform: translateY(0);
}

.v-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
}

.v-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.v-modal-close:hover {
    color: #fff;
}

.v-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
    text-align: left; /* Ensure text is left aligned in modal */
}

.v-modal-body ul {
    padding-left: 20px;
    margin-bottom: 16px;
    text-align: left;
}

.v-modal-body p {
    margin-bottom: 16px;
    text-align: left;
}

.v-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: flex-end;
}

.v-modal-btn {
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.v-modal-btn:hover {
    background: var(--brand-hover);
}