/* Shuffle Dark + Gold Theme */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-elevated: #141414;
    --bg-hover: #1a1a1a;
    --gold: #d4af37;
    --gold-bright: #f4d03f;
    --gold-dim: #8b7355;
    --text: #ffffff;
    --text-muted: #888888;
    --text-dim: #555555;
    --danger: #ef4444;
    --success: #22c55e;
    --border: #222222;
    --shadow: rgba(0,0,0,0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Navbar */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 20px; }

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
}

.nav-left a:not(.logo) {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-left a:not(.logo):hover { color: var(--text); }

.inbox-link {
    position: relative;
    color: var(--text-muted);
}

.inbox-link:hover { color: var(--text); }

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

.mod-badge { font-size: 1.2rem; }

.user-menu { position: relative; }

.user-menu > a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 150px;
    display: none;
    box-shadow: 0 4px 12px var(--shadow);
}

.user-menu.open .dropdown { display: block; }

.dropdown a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
}

.dropdown a:hover { background: var(--bg-hover); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-gold {
    background: var(--gold);
    color: var(--bg-primary);
}

.btn-gold:hover { background: var(--gold-bright); color: var(--bg-primary); }

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

.btn-outline:hover { background: var(--gold); color: var(--bg-primary); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-full { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 1.1rem; }

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--gold);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

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

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.view-all {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.95rem;
}

/* Cards */
.ranking-list { display: flex; flex-direction: column; gap: 10px; }

.dancer-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.dancer-card:hover { background: var(--bg-hover); transform: translateX(5px); }

.dancer-card.rank-1 { border-left-color: var(--gold); }
.dancer-card.rank-2 { border-left-color: #c0c0c0; }
.dancer-card.rank-3 { border-left-color: #cd7f32; }

.rank-badge {
    width: 30px;
    font-weight: bold;
    color: var(--text-muted);
}

.avatar, .avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    background: var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.avatar-placeholder.large {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

.info h3 { font-size: 1rem; margin-bottom: 3px; }

.info .rating { color: var(--gold); font-size: 0.9rem; }

.info .stats { color: var(--text-muted); font-size: 0.85rem; }

/* Video Grid */
.video-grid, .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card, .photo-card {
    background: var(--bg-elevated);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
}

.video-card:hover, .photo-card:hover { transform: translateY(-5px); }

.thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
}

.thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card:hover .play-overlay { opacity: 1; }

.video-card .info, .photo-card .info { padding: 15px; }

.video-card h3, .photo-card h3 { font-size: 1rem; margin-bottom: 5px; }

.video-card p, .photo-card p { color: var(--text-muted); font-size: 0.9rem; }

.meta { display: flex; gap: 15px; margin-top: 10px; color: var(--text-dim); font-size: 0.85rem; }

/* Photo Card */
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Event Grid */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.event-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.event-card:hover { border-color: var(--gold); }

.event-date {
    min-width: 60px;
    text-align: center;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.event-date .day { font-size: 1.5rem; font-weight: bold; color: var(--gold); display: block; }

.event-date .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

.event-card h3 { font-size: 1.1rem; margin-bottom: 5px; }

.event-card .league { color: var(--gold); font-size: 0.85rem; }

.event-card .location { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }

.participants { font-size: 0.85rem; color: var(--text-dim); }

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: var(--bg-elevated);
    border-radius: 15px;
    border: 1px solid var(--border);
}

.auth-form h2 { text-align: center; margin-bottom: 25px; }

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--gold);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Profile Page */
.profile-header {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: var(--bg-elevated);
    border-radius: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.profile-avatar img, .profile-avatar .avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--gold);
}

.profile-info h1 { font-size: 2rem; margin-bottom: 5px; }
.profile-info .location { color: var(--text-muted); margin-bottom: 10px; }
.profile-info .bio { margin-bottom: 15px; max-width: 600px; }
.profile-stats { display: flex; gap: 20px; color: var(--text-muted); font-size: 0.9rem; }
.profile-stats span { color: var(--gold); }

.profile-actions { margin-left: auto; }

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: color 0.2s;
}

.tab:hover { color: var(--text); }

.tab.active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
    margin-bottom: -1px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Video Page */
.video-page { max-width: 900px; margin: 0 auto; }

.video-player {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player video {
    width: 100%;
    display: block;
}

.video-info h1 { font-size: 1.5rem; margin-bottom: 10px; }

.video-info .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.rating-display { font-size: 1.1rem; color: var(--gold); }

.rating-input { display: flex; align-items: center; gap: 10px; }

.stars .star {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.1s;
}

.stars .star.filled, .stars .star:hover { color: var(--gold); }

.description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
    background: var(--bg-elevated);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Comments */
.comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.comments-section h3 { margin-bottom: 20px; }

.comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.comment-form textarea {
    flex: 1;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    resize: vertical;
}

.comment {
    padding: 15px;
    background: var(--bg-elevated);
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-author {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-author a { font-weight: 600; }
.comment-author .time { color: var(--text-dim); }
.comment-content { color: var(--text-muted); }

/* Photo Page */
.photo-page { text-align: center; }

.photo-container {
    background: #000;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.photo-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.photo-info { text-align: left; max-width: 800px; margin: 0 auto; }

/* Event Page */
.event-page { max-width: 800px; margin: 0 auto; }

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

.event-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }

.event-header h1 { font-size: 2rem; margin-bottom: 5px; }
.league-name { color: var(--gold); font-size: 1.1rem; }

.event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: var(--bg-elevated);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail .label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 5px; }
.detail .value { font-size: 1.1rem; }

.event-description { margin-bottom: 30px; line-height: 1.7; color: var(--text-muted); }
.event-actions { text-align: center; }

/* Inbox & Messages */
.inbox-page h1 { margin-bottom: 20px; }
.unread-badge { font-size: 0.8rem; background: var(--gold); color: #000; padding: 3px 8px; border-radius: 10px; vertical-align: middle; }
.inbox-actions { margin-bottom: 20px; }

.messages-list { display: flex; flex-direction: column; gap: 10px; }

.message-card {
    background: var(--bg-elevated);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.message-card.unread { border-left-color: var(--gold); background: var(--bg-secondary); }
.message-card:hover { background: var(--bg-hover); }

.message-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.sender { font-weight: 600; }
.sender.system { color: var(--text-muted); }
.time { color: var(--text-dim); font-size: 0.85rem; }

.message-content { color: var(--text-muted); font-size: 0.95rem; white-space: pre-wrap; }
.rejection-details { margin-top: 10px; font-size: 0.85rem; color: var(--danger); }

/* Conversation */
.conversation-page { display: flex; flex-direction: column; height: calc(100vh - 200px); max-width: 800px; margin: 0 auto; }
.conversation-header { padding: 15px; background: var(--bg-elevated); border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--border); }
.conversation-header a { display: flex; align-items: center; gap: 10px; font-weight: bold; }

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    position: relative;
}

.message-bubble.sent { align-self: flex-end; background: var(--gold); color: #000; border-bottom-right-radius: 2px; }
.message-bubble.received { align-self: flex-start; background: var(--bg-elevated); border-bottom-left-radius: 2px; }
.message-bubble .time { display: block; font-size: 0.7rem; margin-top: 5px; opacity: 0.7; text-align: right; }

.reply-form {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--bg-elevated);
    border-radius: 0 0 10px 10px;
}

.reply-form textarea { flex: 1; padding: 10px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; color: var(--text); resize: none; }

/* Moderation */
.moderation-page { max-width: 900px; margin: 0 auto; }
.queue-stats { color: var(--text-muted); margin-bottom: 20px; }
.filter-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.queue-list { display: flex; flex-direction: column; gap: 20px; }
.queue-item { background: var(--bg-elevated); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.item-header { display: flex; align-items: center; gap: 15px; padding: 15px; background: var(--bg-secondary); }
.item-type { background: var(--gold); color: #000; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

.item-preview { display: flex; gap: 20px; padding: 20px; }
.item-preview img { width: 200px; border-radius: 6px; object-fit: cover; }
.item-info h3 { margin-bottom: 5px; }
.item-info p { color: var(--text-muted); font-size: 0.9rem; }

.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
}

.reject-select {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
}

/* Settings */
.settings-page { max-width: 600px; margin: 0 auto; }
.settings-section { background: var(--bg-elevated); padding: 25px; border-radius: 10px; margin-bottom: 20px; }
.settings-section h2 { margin-bottom: 20px; font-size: 1.2rem; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.settings-section.danger { border: 1px solid var(--danger); }
.note { color: var(--text-dim); font-size: 0.85rem; margin-top: 10px; }

/* Upload Page */
.upload-page { max-width: 600px; margin: 0 auto; }
.upload-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.upload-form { display: none; }
.upload-form.active { display: block; }
.upload-note { text-align: center; color: var(--text-dim); font-size: 0.85rem; margin-top: 20px; }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--bg-elevated);
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}

.modal-content h3 { margin-bottom: 15px; }
.modal-content textarea {
    width: 100%;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    resize: vertical;
    margin-bottom: 15px;
}

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Utilities */
.hidden { display: none !important; }
.error { color: var(--danger); padding: 20px; text-align: center; background: var(--bg-elevated); border-radius: 10px; }
.empty { color: var(--text-dim); text-align: center; padding: 40px; font-style: italic; }
.page-header { margin-bottom: 30px; }
.page-header h1 { font-size: 2rem; }

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Home layout - two columns */
.home-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.home-sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 80px;               /* adjust if your navbar height differs */
    background: var(--bg-elevated);
    border-radius: 10px;
    padding: 20px;
}

.home-sidebar .btn-full {
    margin-bottom: 20px;
}

.sidebar-nav h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    color: var(--text);
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--gold);
}

.home-main {
    flex: 1;
    min-width: 0;            /* prevents grid items from overflowing */
}

/* Event list item (vertical) */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    transition: transform 0.2s;
}

.event-list-item:hover {
    transform: translateX(5px);
    background: var(--bg-hover);
}

.event-date-badge {
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    color: var(--gold);
}

.event-info {
    flex: 1;
}

.event-info h4 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.event-location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.event-participants {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Sidebar active link highlighting */
.sidebar-nav a.active {
    background: var(--gold);
    color: var(--bg-primary);
    font-weight: 500;
}

.sidebar-nav a.active:hover {
    background: var(--gold-bright);
    color: var(--bg-primary);
}

/* Ensure the rankings layout uses the same two-column setup */
.rankings-layout.home-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.rankings-sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 80px;               /* same as home sidebar */
}

.rankings-main {
    flex: 1;
    min-width: 0;
}

/* Global two‑column layout for pages with aside */
.layout-with-aside {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.global-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 80px;                /* adjust if navbar height differs */
    background: var(--bg-elevated);
    border-radius: 10px;
    padding: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;              /* prevents overflow */
}

/* Search form inside sidebar */
.sidebar-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.sidebar-search input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--gold);
}

.sidebar-search button {
    padding: 10px 15px;
    background: var(--gold);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.sidebar-search button:hover {
    background: var(--gold-bright);
}

/* Sidebar navigation (already exists, but ensure spacing) */
.sidebar-nav {
    margin-top: 25px;
}

.sidebar-nav h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--gold);
}

.sidebar-nav a.active {
    background: var(--gold);
    color: var(--bg-primary);
    font-weight: 500;
}

/* Photo page layout */
.photo-page-layout {
    display: flex;
    gap: 30px;
    min-height: 70vh;
}

.photo-column {
    flex: 1 1 60%;
    max-width: 60%;
}

.photo-column .photo-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: fit-content;
}

.photo-column img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.photo-details-column {
    flex: 1 1 40%;
    max-width: 40%;
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    position: sticky;
    top: 80px;
}

.photo-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.photo-header .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.rating-section {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.rating-display {
    font-size: 1.2rem;
    color: var(--gold);
}

.description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Comments section */
.comments-section {
    margin-top: 25px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.comment-form textarea {
    flex: 1;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    resize: vertical;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px 15px;
    border-left: 3px solid var(--gold-dim);
    transition: background 0.2s;
}

.comment:hover {
    background: var(--bg-hover);
}

.comment-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.comment-author a {
    font-weight: 600;
    color: var(--gold);
}

.comment-author .time {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.comment-content {
    margin: 5px 0 8px;
    color: var(--text);
    word-wrap: break-word;
}

.reply-button {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin-top: 5px;
}

.reply-button:hover {
    text-decoration: underline;
}

.reply-form {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.reply-form.hidden {
    display: none;
}

.reply-form textarea {
    width: 100%;
    padding: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    resize: vertical;
    margin-bottom: 10px;
}

.reply-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.replies {
    margin-left: 20px;
    margin-top: 10px;
    border-left: 2px solid var(--gold-dim);
    padding-left: 15px;
}

.replies .comment {
    background: var(--bg-primary);
}

.photo-column .photo-container {
    background: #000;
    border-radius: 16px;          /* slightly larger radius */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: fit-content;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); /* depth */
    border: 1px solid var(--border); /* subtle border */
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.comment-form button {
    align-self: flex-end;          /* button sits on the right */
    padding: 10px 24px;
    font-weight: 600;
}

/* Responsive: stack columns below 1200px */
.photo-page-layout {
    flex-direction: column;
}
.photo-column,
.photo-details-column {
    max-width: 100%;
    width: 100%;
}
.photo-details-column {
    position: static;      /* remove sticky positioning */
    max-height: none;
    margin-top: 20px;      /* add spacing between photo and details */
}

/* Base style for link‑style buttons */
.btn-link {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-link:hover {
    background: var(--gold);
    color: var(--bg-primary);
    border-color: var(--gold);
}

/* Small variant used in reply actions */
.btn-link.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* If the cancel button appears inside .reply-actions, ensure proper spacing */
.reply-actions .btn-link {
    margin-left: 8px;
}

/* Style all file inputs */
input[type="file"] {
    color: var(--text-muted);
    padding: 8px 0;               /* vertical spacing */
    font-size: 0.95rem;
    width: 100%;
    cursor: pointer;
}

/* Style the actual button inside the file input */
input[type="file"]::file-selector-button {
    background: var(--bg-secondary);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 15px;           /* space between button and text */
}

input[type="file"]::file-selector-button:hover {
    background: var(--gold);
    color: var(--bg-primary);
    border-color: var(--gold);
}

/* Optional: style the text “No file chosen” (or filename) */
input[type="file"] {
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .comment-form button {
        align-self: stretch;       /* full width on small screens */
    }
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .photo-page-layout {
        flex-direction: column;
    }
    .photo-column, .photo-details-column {
        max-width: 100%;
    }
    .photo-details-column {
        position: static;
        max-height: none;
    }
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .layout-with-aside {
        flex-direction: column;
    }
    .global-sidebar {
        position: static;
        width: 100%;
    }
}

/* Responsive stacking */
@media (max-width: 768px) {
    .rankings-layout.home-layout {
        flex-direction: column;
    }
    .rankings-sidebar {
        position: static;
        width: 100%;
    }
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .home-layout {
        flex-direction: column;
    }
    .home-sidebar {
        position: static;
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; }
    .nav-left, .nav-right { width: 100%; justify-content: center; }

    .profile-header { flex-direction: column; text-align: center; }
    .profile-actions { margin-left: 0; margin-top: 20px; }

    .video-grid, .photo-grid, .event-grid { grid-template-columns: 1fr; }

    .item-preview { flex-direction: column; align-items: center; text-align: center; }
    .item-preview img { width: 100%; max-width: 300px; }

    .item-actions { flex-direction: column; }
    .item-actions > * { width: 100%; }
}
