/* style.css - Videoarkiv för recording.nextpixel.se */
/* Färgtema: Marinblå & GULD */

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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #050C14;
    background-image: url('/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #E8EDF2;
    line-height: 1.5;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 12, 20, 0.85);
    z-index: -1;
    pointer-events: none;
}

:root {
    --navy-black: #050C14;
    --navy-deep: #0A1C2E;
    --navy-light: #1A2F44;
    --gold-polished: #D4AF37;
    --gold-bright: #F5D76E;
    --gold-dark: #A67C00;
    --text-muted: #8AA1B9;
    --container-width: 1280px;
}

.main-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.container {
    padding: 0 2rem;
}

.bg-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(212, 175, 55, 0.04);
    z-index: 0;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .bg-watermark {
        display: none;
    }
}

/* ============================================ */
/* HEADER & NAVIGATION */
/* ============================================ */
header {
    background: rgba(10, 28, 46, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #E8EDF2;
    font-size: 1rem;
    transition: color 0.2s;
}

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

.burger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: #E8EDF2;
    background: none;
    border: none;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .burger {
        display: block;
    }
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 28, 46, 0.98);
        backdrop-filter: blur(12px);
        padding: 1rem 0;
        margin-top: 1rem;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu .menu-item {
        width: 100%;
        text-align: center;
    }
}

.main-menu-link {
    color: #E8EDF2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    display: inline-block;
    transition: color 0.2s ease;
}

@media (max-width: 768px) {
    .main-menu-link {
        display: block;
        padding: 1rem;
    }
}

.main-menu-link:hover {
    color: var(--gold-polished);
}

.admin-link {
    color: #E8EDF2;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    padding-left: 1.5rem;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .admin-link {
        border-left: none;
        padding: 1rem;
        display: block;
        border-top: 1px solid rgba(212, 175, 55, 0.15);
    }
}

/* ============================================ */
/* VIDEOARKIV STILAR */
/* ============================================ */
.video-archive-container {
    padding: 2rem;
}

@media (max-width: 768px) {
    .video-archive-container {
        padding: 1rem;
    }
}

.search-section {
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.6), rgba(5, 12, 20, 0.6));
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

@media (max-width: 768px) {
    .search-section {
        padding: 1rem;
    }
}

.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(26, 47, 68, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    color: #E8EDF2;
    font-size: 1rem;
}

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

.search-btn {
    background: var(--gold-polished);
    color: var(--navy-black);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .search-btn {
        width: 100%;
    }
}

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

.clear-btn {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold-polished);
    border: 1px solid var(--gold-polished);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
}

@media (max-width: 768px) {
    .clear-btn {
        width: 100%;
        display: block;
    }
}

.breadcrumbs {
    background: rgba(10, 28, 46, 0.6);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.breadcrumb-link {
    color: var(--gold-polished);
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.section-header-archive {
    margin-bottom: 1.2rem;
    border-left: 4px solid var(--gold-polished);
    padding-left: 1rem;
}

.section-header-archive h2 {
    color: var(--gold-polished);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.section-header-archive p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Mappar Grid */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .folders-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }
}

.folder-card {
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.8), rgba(5, 12, 20, 0.8));
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.folder-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-polished);
}

.folder-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .folder-icon {
        font-size: 2rem;
    }
}

.folder-name {
    color: #E8EDF2;
    font-weight: 500;
    word-break: break-word;
    font-size: 0.85rem;
}

.folder-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Videor Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
}

.video-card {
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.8), rgba(5, 12, 20, 0.8));
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.video-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-polished);
}

.video-wrapper {
    background: #000;
    max-height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.video-wrapper video {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
}

.video-name {
    font-weight: 600;
    color: #E8EDF2;
    margin-bottom: 0.5rem;
    word-break: break-word;
    font-size: 0.85rem;
}

.video-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-watch-modal {
    background: var(--gold-polished);
    color: var(--navy-black);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-watch-modal:hover {
    background: var(--gold-bright);
}

.btn-download {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-polished);
    border: 1px solid var(--gold-polished);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-decoration: none;
}

.btn-download:hover {
    background: var(--gold-polished);
    color: var(--navy-black);
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.favorite-btn.active {
    color: var(--gold-polished);
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-info {
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid var(--gold-polished);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.6), rgba(5, 12, 20, 0.6));
    border-radius: 20px;
}

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

.stat-card {
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.6), rgba(5, 12, 20, 0.6));
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-card .number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold-polished);
}

.stat-card .label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 12, 20, 0.98);
    backdrop-filter: blur(12px);
}

.video-modal-content {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.video-modal-container {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.video-modal-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-video-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--gold-polished);
    font-size: 35px;
    cursor: pointer;
}

.video-modal-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: rgba(10, 28, 46, 0.9);
    text-align: center;
    border-radius: 12px;
}

.video-modal-info a {
    color: var(--gold-polished);
    margin-left: 1rem;
}

/* Admin Modal */
.admin-modal {
    display: none;
    position: fixed;
    z-index: 20000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 12, 20, 0.98);
    backdrop-filter: blur(12px);
}

.admin-modal-content {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 900px;
    height: 85%;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.95), rgba(5, 12, 20, 0.95));
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.close-admin-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--gold-polished);
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
}

.admin-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.admin-modal-header h2 {
    color: var(--gold-polished);
    margin: 0;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    flex-wrap: wrap;
}

.admin-tab-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #E8EDF2;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.admin-tab-btn.active {
    background: var(--gold-polished);
    color: var(--navy-black);
}

.admin-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.tab-pane {
    display: none;
}

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

.admin-form-group {
    margin-bottom: 1rem;
}

.admin-form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.admin-form-group input,
.admin-form-group select {
    width: 100%;
    padding: 0.6rem;
    background: rgba(26, 47, 68, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #E8EDF2;
}

.admin-btn {
    background: var(--gold-polished);
    color: var(--navy-black);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
}

.admin-btn-danger {
    background: #dc3545;
    color: white;
}

.admin-small-btn {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold-polished);
    border: none;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.7rem;
}

.admin-control-btn {
    background: var(--gold-polished);
    color: var(--navy-black);
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

.admin-message {
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.admin-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.admin-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.admin-list {
    list-style: none;
    padding: 0;
}

.admin-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

/* Footer */
footer {
    background: rgba(5, 12, 20, 0.8);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 2rem;
}

.footer-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.95), rgba(5, 12, 20, 0.95));
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo .logo-text-large {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--gold-polished);
}

.login-box h2 {
    color: var(--gold-polished);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.login-form-group {
    margin-bottom: 1rem;
}

.login-form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.login-form-group input {
    width: 100%;
    padding: 0.7rem;
    background: rgba(26, 47, 68, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #E8EDF2;
}

.login-btn {
    width: 100%;
    padding: 0.7rem;
    background: var(--gold-polished);
    color: var(--navy-black);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.login-error {
    background: rgba(220, 53, 69, 0.2);
    border-left: 3px solid #dc3545;
    padding: 0.5rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
    font-size: 0.8rem;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    font-size: 0.7rem;
}
/* ============================================ */
/* PAGINATION STILAR */
/* ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    background: linear-gradient(145deg, rgba(10, 28, 46, 0.8), rgba(5, 12, 20, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #E8EDF2;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-polished);
}

.pagination .active {
    background: var(--gold-polished);
    color: var(--navy-black);
    border-color: var(--gold-polished);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Fortsätt titta - badge */
.resume-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    border-left: 2px solid var(--gold-polished);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

.resume-badge i {
    margin-right: 0.3rem;
}
/* ============================================ */
/* DÖLJ LÄNKFÖRHANDSVISNING (TOOLTIP) */
/* ============================================ */

/* Döljer den fula gula/röda tooltip-rutan som visas vid hover */
a[download]::-moz-list-bullet,
a[download]::before,
a[download]::after {
    display: none !important;
}

/* Förhindrar att title-attribut visas som tooltip */
a[title],
button[title],
[title] {
    /* Ta bort title-attributet via CSS går inte, 
       men vi kan göra tooltip-innehållet tomt via JS istället */
}

/* Döljer den webbläsarens standard tooltip på alla element */
* {
    /* Detta förhindrar inte tooltip helt, 
       men vi behöver JS för att helt ta bort title-attribut */
}

/* Extra: Döljer den fula border som kan visas runt vissa element */
a:focus, button:focus {
    outline: none;
}

/* För Safari/Chrome - döljer den gula rutan vid download-länkar */
a[download] {
    text-decoration: none;
}

/* Döljer den flytande texten som visas vid hover på vissa element */
abbr[title] {
    text-decoration: none;
    cursor: help;
}

/* Förhindrar att något title-attribut visas som tooltip */
/* Detta är den viktigaste regeln - men den stoppar inte helt alla webbläsare */
[title] {
    /* title-attribut kan inte döljas helt med CSS, 
       men vi sätter det till en tom sträng via JS i stället */
}
/* ============================================ */
/* DÖLJ LÄNKFÖRHANDSVISNING (TOOLTIP) - FÖRBÄTTRAD */
/* ============================================ */

/* Dölj den fula gula tooltip-rutan i Chrome/Safari */
::-webkit-validation-bubble-message,
::-webkit-validation-bubble-arrow-clipper,
::-webkit-validation-bubble-arrow {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* För Firefox - döljer den lilla rutan */
:-moz-ui-invalid:not(output) {
    box-shadow: none;
}

/* Döljer alla eventuella tooltips från attribut */
[data-tooltip],
[data-title],
[tooltip] {
    --tooltip-visible: hidden;
    pointer-events: auto;
}

/* Förhindra att någon URL visas i statusfältet (om möjligt) */
a {
    pointer-events: auto;
}

/* Döljer den lilla rutan som visas vid hover */
.tooltip,
[role="tooltip"],
.tippy-tooltip {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}