/* =========================================
   COLOR PALETTE (from your image)
   ========================================= */
:root {
    --cream: #F3E8D0;      /* background */
    --brown: #4A321E;      /* text + nav bg */
    --yellow: #F2C311;     /* tennis ball yellow */
    --olive: #C5C48B;      /* optional accent */
}

/* =========================================
   GLOBAL
   ========================================= */
body {
    background: var(--cream);
    color: var(--brown);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0 0 80px 0; /* space for bottom nav */
}

.content {
    padding: 20px;
}

/* utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

/* =========================================
   HOME / DASHBOARD ELEMENTS
   ========================================= */
.logo {
    width: 140px;
    display: block;
    margin: 40px auto 10px auto;
}

.title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--brown);
}

.subtitle {
    text-align: center;
    opacity: 0.8;
    font-size: 14px;
    margin-top: 10px;
}

.primary-btn {
    display: block;
    width: 80%;
    margin: 30px auto;
    padding: 14px;
    text-align: center;
    background: var(--yellow);
    color: var(--brown);
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* =========================================
   BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--brown);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 2px solid var(--olive);
    z-index: 100;
}

.nav-item {
    text-align: center;
    text-decoration: none;
    color: var(--cream);
    font-size: 12px;
}

.nav-item span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
}

.nav-active {
    color: var(--yellow) !important;
}

/* =========================================
   CARDS / BOXES (rankings, match cards, etc.)
   ========================================= */
.card {
    background: #ffffffa0;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 16px;
    border-radius: 12px;
    margin: 10px 0;
}

.card-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 6px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.small-text {
    font-size: 12px;
    opacity: 0.7;
}

/* =========================================
   PROFILE PAGE
   ========================================= */
.profile-header {
    text-align: center;
    margin-top: 30px;
}

.profile-photo {
    width: 100px;
    height: 100px;
    background: var(--brown);
    border-radius: 50%;
    margin: 0 auto;
}

.profile-name {
    margin-top: 10px;
    font-size: 20px;
    font-weight: bold;
}

.profile-info-section {
    margin-top: 20px;
}

.info-label {
    font-size: 12px;
    opacity: 0.6;
}

.info-value {
    font-size: 16px;
    font-weight: bold;
}

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

.table th {
    text-align: left;
    padding: 10px;
    background: var(--brown);
    color: var(--cream);
}

.table td {
    padding: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* optional color highlight for ranks */
.rank-1 { background: #ffeaa7; }
.rank-2 { background: #fab1a0; }
.rank-3 { background: #81ecec; }

.accordion-container {
    margin-top: 30px;
}

.accordion {
    background: #ffffffa0;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.accordion-header i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.accordion-body {
    display: none;
    padding: 0 16px 16px 16px;
    font-size: 14px;
    line-height: 1.5;
    text-align:left;
}

.accordion-body ul {
    margin-left: 16px;
    padding-left: 0;
}

.accordion.open .accordion-body {
    display: block;
}

.accordion.open .accordion-header i {
    transform: rotate(180deg);
}

 .profile-container {
    padding: 20px;
    text-align: center;
}

/* avatar */
.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #4A321E;
    object-fit: cover;
    margin-bottom: 10px;
}

/* name */
.profile-name {
    font-size: 22px;
    font-weight: bold;
    color: #4A321E;
    margin-bottom: 6px;
}

/* bio */
.profile-bio {
    font-size: 14px;
    color: #4A321E;
    opacity: 0.8;
    margin-bottom: 20px;
    padding: 0 20px;
    line-height: 1.4;
}

/* accordion shared with homepage */
.accordion-container {
    margin-top: 20px;
}

.accordion {
    background: #ffffffdd;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-bottom: 12px;
}

.accordion-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.accordion-header i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.accordion-body {
    display: none;
    padding: 0 16px 16px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.accordion.open .accordion-body {
    display: block;
}

.accordion.open .accordion-header i {
    transform: rotate(180deg);
}

.form-container {
    padding: 20px;
    text-align: left;
}

.form-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #4A321E;
    margin-bottom: 20px;
}

label {
    font-size: 14px;
    color: #4A321E;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.2);
    margin-bottom: 15px;
    font-size: 14px;
}

.check-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.preview-container {
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    max-height: 300px;
    background: #fff;
}

#avatarPreview {
    width: 100%;
    display: block;
}

/* form container */
.form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
}

/* make all form elements responsive inside container */
.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    box-sizing: border-box; /* CRITICAL FIX */
    padding: 12px 15px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
}

/* label spacing fix */
.form-container label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #4A321E;
}

.secondary-btn {
    display: block;
    width: 80%;
    margin: 30px auto;
    padding: 14px;
    text-align: center;
    background: #f5f5f5;
    color: var(--brown);
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.secondary-btn a {
    display: block;
    width: 80%;
    margin: 30px auto;
    padding: 14px;
    text-align: center;
    background: #f5f5f5;
    color: var(--brown);
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.secondary-btn:hover {
    background: #eaeaea;
}