@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #111e3b 0%, #30415d 100%);
    --glass-bg: rgba(240, 240, 232, 0.05);
    --glass-border: rgba(240, 240, 232, 0.15);
    --accent: #e0c88f;
    --accent-hover: #d0c0b0;
    --text-main: #f0f0e8;
    --text-muted: rgba(208, 192, 176, 0.8);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

a, a:hover, a:visited, a:active, a:focus {
    text-decoration: none !important;
}

/* Utils */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

/* Header */
header {
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 16px 16px;
    border-top: none;
}

header h1 {
    font-weight: 800;
    font-size: 2rem;
    background: linear-gradient(to right, #e0c88f, #f0f0e8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Navigation (Tabs) */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.nav-btn {
    background: rgba(224, 200, 143, 0.1);
    border: 1px solid rgba(224, 200, 143, 0.15);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-btn i {
    font-size: 1.1em;
}

.nav-btn.active,
.nav-btn:hover {
    background: rgba(224, 200, 143, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(224, 200, 143, 0.15);
    color: var(--accent);
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--glass-bg);
    transform: translateX(-50%);
    border-radius: 4px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    width: 100%;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    padding: 15px 20px;
    transition: transform 0.3s ease;
    position: relative;
    text-decoration: none !important;
}

.timeline-content a {
    text-decoration: none !important;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
}

.timeline-date {
    display: inline-block;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 0.9rem;
    background: rgba(139, 92, 246, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.timeline-title {
    font-size: 1.25rem;
    margin-bottom: 5px;
    font-weight: 800;
}

.timeline-artist {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.timeline-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-image {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    cursor: zoom-in;
}

.timeline-image:hover img {
    transform: scale(1.05);
}

/* ===== LIGHTBOX ===== */
#photo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.25s ease;
}

#photo-lightbox.open {
    display: flex;
}

@keyframes lbFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#photo-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: lbZoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes lbZoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#lb-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 9991;
}

#lb-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

#lb-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    max-width: 80vw;
    pointer-events: none;
}

/* ===== END LIGHTBOX ===== */

.timeline-player {
    margin-top: 10px;
    width: 100%;
}

.timeline-player iframe {
    width: 100%;
    border-radius: 12px;
    border: none;
    min-height: 80px;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--bg-gradient);
    border: 3px solid var(--accent);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--accent);
    z-index: 10;
    margin-top: 25px;
}

/* DataTables Styling */
.table-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

table.dataTable {
    color: var(--text-main);
    width: 100% !important;
    border-collapse: collapse !important;
}

table.dataTable thead th {
    border-bottom: 2px solid var(--glass-border) !important;
    color: var(--accent);
    font-weight: 600;
    padding: 15px 10px;
}

table.dataTable tbody tr {
    background-color: transparent !important;
    transition: background-color 0.2s;
}

table.dataTable tbody tr:hover {
    background-color: var(--glass-bg) !important;
}

table.dataTable tbody td {
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 10px;
    vertical-align: middle;
}

.table-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-main) !important;
    margin-bottom: 15px;
    font-family: 'Outfit', sans-serif;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 8px;
    padding: 6px 12px;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent);
}

#year-select option {
    background-color: #fff !important;
    color: #000 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-main) !important;
    background: var(--glass-bg) !important;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    margin: 0 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
    background: var(--accent) !important;
    border: 1px solid var(--accent);
    color: white !important;
}

/* Ascunde iconița de expand (săgeată/plus) de la DataTables Responsive */
table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control::before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control::before {
    display: none !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"] {
    cursor: pointer;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control {
    padding-left: 10px !important;
}

/* Admin Form */
.admin-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 14px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.form-control::file-selector-button {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control::file-selector-button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e0c88f 0%, #d0c0b0 100%);
    border: none;
    border-radius: 10px;
    color: #111e3b;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loader-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-text {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(to right, #e0c88f, #f0f0e8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Password Overlay */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.password-overlay.active {
    display: flex;
}

.password-card {
    max-width: 400px;
    width: 100%;
    padding: 40px 30px;
    text-align: center;
}

.password-card h2 {
    margin-bottom: 15px;
    color: var(--accent);
}

.password-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

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

    .timeline-container::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: column;
        align-items: flex-end;
        margin-bottom: 40px;
    }

    .timeline-content {
        width: calc(100% - 45px);
    }

    .timeline-dot {
        left: 20px;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: left;
    }

    .table-container {
        padding: 10px 15px;
        margin-left: 0;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.dataTable thead th,
    table.dataTable tbody td {
        padding: 10px 5px !important;
        font-size: 0.85rem;
    }

    .table-thumb {
        width: 45px;
        height: 45px;
    }
}

/* Force show columns on desktop if DataTables Responsive is too aggressive */
@media (min-width: 1024px) {

    #eventsTable th.desktop,
    #eventsTable td.desktop {
        display: table-cell !important;
    }
}