/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #121614;
    --bg-card: #1c2320;
    --bg-card-hover: #242c29;
    --accent: #FF6B35;
    --accent-hover: #e85a28;
    --text-main: #f4f4f4;
    --text-muted: #9aa8a1;
    --border-color: rgba(255, 255, 255, 0.1);
    --error: #ff4d4d;
    --success: #2ebd59;
    
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.hidden { display: none !important; }
.mt-4 { margin-top: 1rem; }

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 20px;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-bottom: 2px solid var(--accent);
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(18, 22, 20, 0.6) 0%, rgba(18, 22, 20, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.hero h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Badges & Countdowns */
.status-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.cd-item {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 80px;
}

.cd-item span {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1;
    color: var(--accent);
}

.cd-item label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Main Layout */
.main-container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: flex;
    flex-direction: column;
}

/* Climbs List Section */
.climbs-section {
    margin-bottom: 60px;
    text-align: center;
}

.climbs-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 32px;
    color: var(--text-main);
}

.climbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.climb-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.climb-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.climb-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.climb-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.climb-difficulty, .climb-location {
    display: flex;
    align-items: center;
    gap: 12px;
}

.climb-difficulty::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.climb-location::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
}


/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    text-transform: uppercase;
    padding: 8px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -17px; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

.tab-section {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms & Cards */
.form-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.form-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group { margin-bottom: 24px; }
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .form-group { flex: 1; }

@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

input[type="text"], input[type="email"], textarea, select {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0,0,0,0.4);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2399aa91' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* File Drop Zone */
input[type="file"] { display: none; }

.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(255, 107, 53, 0.05);
    color: var(--accent);
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3); }

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Upload Overlay */
.upload-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(28, 35, 32, 0.85); /* Matches --bg-card */
    backdrop-filter: blur(4px);
    border-radius: 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}
.large-spinner {
    width: 50px; height: 50px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}
.upload-overlay p {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.error-message {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid var(--error);
    color: #ffb3b3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Success View */
.success-icon {
    width: 64px; height: 64px;
    background: rgba(46, 189, 89, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.success-icon svg { width: 32px; height: 32px; }

.my-submission-preview {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.media-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-wrap img, .media-wrap video {
    max-width: 100%; max-height: 100%; object-fit: contain;
}

.my-submission-details { padding: 16px; }
.caption-text { color: var(--text-main); font-size: 0.95rem; margin-bottom: 8px; }
.vote-status { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 0.85rem; }

/* Share Panel */
.share-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.share-link-wrap {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.share-link-wrap input { flex: 1; }
.share-link-wrap button { width: auto; padding: 0 20px; font-size: 1rem; }

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.social-buttons.mini { display: flex; }
.btn-social {
    padding: 12px; border: none; border-radius: 8px; color: white; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-social.fb, .btn-icon.fb { background: #1877F2; }
.btn-social.tw, .btn-icon.tw { background: #000; border: 1px solid rgba(255,255,255,0.2); }
.btn-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: none; color: white; cursor: pointer; }
.btn-icon.link { background: #333; }
.btn-icon svg { width: 20px; height: 20px; }

.bonus-msg { margin-top: 16px; font-size: 0.9rem; color: var(--accent); font-weight: 500; background: rgba(255, 107, 53, 0.1); padding: 12px; border-radius: 8px; text-align: center; }

/* Gallery Section */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.gallery-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
}

.filter-group { display: flex; align-items: center; gap: 12px; }
.filter-group select { width: 200px; padding: 10px 16px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.2);
}

.card-thumb {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: #000;
}

.card-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-caption {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.author-name { font-weight: 500; }
.card-votes { display: flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; }

.card-vote-btn {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.2s;
}
.card-vote-btn:hover { background: rgba(255, 107, 53, 0.1); color: var(--accent); border-color: var(--accent); }
.card-vote-btn.voted { background: rgba(46, 189, 89, 0.1); color: var(--success); border-color: rgba(46, 189, 89, 0.3); cursor: default; }

.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px dashed var(--border-color);
}
.gallery-empty svg { color: var(--text-muted); margin-bottom: 16px; }
.gallery-empty h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 8px; }

.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-wrap button { max-width: 200px; margin: 0 auto; }

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 20px;
    background: transparent; border: none; color: white; cursor: pointer; z-index: 1010;
    padding: 8px; transition: transform 0.2s;
}
.lightbox-close:hover { transform: scale(1.1); }

.lightbox-content {
    position: relative;
    z-index: 1005;
    display: flex;
    max-width: 1200px;
    width: 90%;
    height: 80vh;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

@media (max-width: 900px) {
    .lightbox-content { flex-direction: column; height: 90vh; }
    .lightbox-media { height: 50%; }
    .lightbox-sidebar { height: 50%; }
}

.lightbox-media {
    flex: 2;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-media img, .lightbox-media video, .lightbox-media iframe {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-sidebar {
    flex: 1;
    min-width: 300px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
}

.lightbox-header { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.author-info { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.author-avatar svg { width: 20px; height: 20px; }

.lb-caption { flex: 1; font-size: 1rem; color: var(--text-main); margin-bottom: 24px; white-space: pre-wrap; }

.lb-vote-section { margin-bottom: 24px; padding: 20px; background: rgba(0,0,0,0.2); border-radius: 8px; text-align: center; }
.vote-count-wrap { margin-top: 12px; font-size: 0.9rem; color: var(--accent); font-weight: 600; }

.lb-share { padding-top: 20px; border-top: 1px solid var(--border-color); }
.share-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; }

.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer; z-index: 1010; backdrop-filter: blur(4px); transition: all 0.2s;
}
.nav-btn:hover { background: var(--accent); border-color: var(--accent); }
.nav-btn.prev { left: 20px; }
.nav-btn.next { right: 20px; }

/* Powered By */
#wbx-powered-by-slot { margin-top: 40px; display: flex; justify-content: center; width: 100%; }