/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables - Branding BeSuccess */
:root {
    --gold: #c1913c;
    --gold-light: #cba96e;
    --gold-bright: #e4a910;
    --white: #FFFFFF;
    --black: #000000;
    --gray-dark: #1a1a1a;
    --gray-medium: #333333;
    --gray-light: #666666;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.logo-animation {
    font-size: 5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.gold-text {
    color: var(--gold);
}

/* Header */
.header {
    background: var(--gray-dark);
    border-bottom: 2px solid var(--gold);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-family: 'Akzidenz-Grotesk BQ', 'Akzidenz Grotesk', 'Helvetica Neue', Arial, sans-serif;
    color: var(--gold);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    background: var(--gray-medium);
    border: 1px solid var(--gold);
    color: var(--gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--gold);
    color: var(--black);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--gray-dark);
    border: 1px solid var(--gold);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: none;
    color: var(--white);
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: var(--gray-medium);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 4px 0;
}

/* Navigation */
.nav {
    background: var(--gray-dark);
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-medium);
}

.nav-tabs {
    display: flex;
    gap: 1rem;
}

.nav-tab {
    background: none;
    border: none;
    color: var(--gray-light);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 1rem;
}

.nav-tab:hover {
    background: var(--gray-medium);
    color: var(--white);
}

.nav-tab.active {
    background: var(--gold);
    color: var(--black);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.2rem;
}

/* Main */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
}

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gray-light);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0;
    justify-content: center;
    padding: 20px;
    background: var(--gray-dark);
    border-radius: 12px;
}

.category-filter {
    padding: 12px 24px;
    border: 2px solid var(--gray-medium);
    background: transparent;
    color: var(--white);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filter:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.category-filter.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    font-weight: 600;
}

.category-filter .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.category-filter.active .count {
    background: rgba(0, 0, 0, 0.2);
}

/* Challenges Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.challenge-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray-medium);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.challenge-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.challenge-card:hover::before {
    transform: scaleY(1);
}

.challenge-card.completed {
    border-color: var(--success);
}

.challenge-card.completed::before {
    background: var(--success);
    transform: scaleY(1);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.challenge-theme {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.challenge-status {
    font-size: 1.5rem;
}

.challenge-title {
    color: var(--gold);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.challenge-description {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.challenge-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.difficulty {
    display: flex;
    gap: 2px;
}

.star {
    color: var(--gold);
}

.star.empty {
    color: var(--gray-medium);
}

.points {
    color: var(--gold);
    font-weight: 600;
}

.challenge-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray-medium);
    color: var(--white);
    border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
    background: var(--gray-light);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

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

.btn-link {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    text-decoration: underline;
}

/* Profile */
.profile-card {
    background: var(--gray-dark);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.profile-info h2 {
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--gray-light);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: var(--gray-medium);
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray-light);
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-medium);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    transition: width 0.5s ease;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-card:hover {
    transform: scale(1.05);
}

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

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--gray-dark);
    border: 2px solid var(--gold);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-medium);
}

.modal-header h2 {
    color: var(--gold);
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--gold);
}

.modal-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: var(--gray-medium);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-input::placeholder {
    color: var(--gray-light);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray-light);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.upload-zone:hover {
    border-color: var(--gold);
    background: var(--gray-medium);
}

.upload-zone.dragover {
    border-color: var(--gold);
    background: var(--gray-medium);
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.photo-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.challenge-info {
    background: var(--gray-medium);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--gold);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.3);
    border: none;
    color: var(--white);
    font-size: 3rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50%;
}

.lightbox-nav:hover {
    background: var(--gold);
    color: var(--black);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.lightbox-info {
    background: var(--gray-dark);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--gold);
    width: 100%;
    max-width: 600px;
}

.lightbox-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--gray-light);
}

.lightbox-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--gray-dark);
    border: 1px solid;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast.warning {
    border-color: var(--warning);
}

.toast.info {
    border-color: var(--info);
}

.toast-icon {
    font-size: 1.5rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .challenges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .nav-label {
        display: none;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}
