* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}
.container {
    max-width: 600px;
    margin: auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 { color: #667eea; margin-bottom: 10px; text-align: center; }
.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
}
.total h2 { font-size: 2em; }
.bidrag-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}
.admin-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #667eea;
}
.kvittering-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    background: #17a2b8;
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 50px;
    font-weight: bold;
}
.kvittering-link:hover {
    background: #138496;
}
.install-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto 10px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}
.install-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}
.install-section {
    text-align: center;
    padding: 40px 20px;
}
.install-section h2 {
    color: #333;
    margin-bottom: 20px;
}
.install-section p {
    color: #666;
    margin-bottom: 30px;
}
.install-icon {
    font-size: 60px;
    margin-bottom: 20px;
}
.refresh-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 10px auto;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}
.content-section {
    display: block;
}
.hidden {
    display: none !important;
}
.knapp-rad {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.knapp {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}
.knapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.knapp-admin {
    background: #6c757d;
    color: white;
}
.knapp-kvittering {
    background: #17a2b8;
    color: white;
}
.knapp-gallery {
    background: #fd7e14;
    color: white;
}
.knapp-video {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}
.knapp-bidrag {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #333;
}

.knapp-tilbake {
    background: #6c757d;
    color: white;
}

/* ==================== VIDEO GALLERI STILER ==================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.thumbnail-container {
    position: relative;
    background: #000;
}

.thumbnail-container img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.video-card:hover .play-icon-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 12px;
}

.video-info h3 {
    font-size: 1em;
    margin-bottom: 5px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-tag {
    display: inline-block;
    background: #17a2b8;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 10px;
    margin: 5px 0;
}

.stats {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    display: flex;
    gap: 15px;
}

.download-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #218838;
}

/* Modal for video */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

video.modal-content {
    width: auto;
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 12px;
    background: rgba(0,0,0,0.7);
    font-size: 14px;
}

.modal-download {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: background 0.3s;
}

.modal-download:hover {
    background: #218838;
}

/* Søkefelt */
.search-box {
    margin: 20px 0;
    text-align: center;
}

.search-box input {
    padding: 12px 20px;
    width: 100%;
    max-width: 400px;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

/* Filter knapper */
.filter-buttons {
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.filter-btn {
    background: #e9ecef;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
}

/* Responsiv design for videoer */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .thumbnail-container img {
        height: 150px;
    }
    
    .play-icon-overlay {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .thumbnail-container img {
        height: 200px;
    }
    
    .modal-download {
        bottom: 70px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Ingen resultater */
.ingen-videoer {
    text-align: center;
    padding: 50px;
    color: #888;
    font-size: 1.1em;
}

/* Admin video grid */
.admin-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.admin-video-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.admin-video-card .thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-video-card h4 {
    font-size: 13px;
    margin: 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slett-btn {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    font-size: 11px;
    margin-top: 8px;
}

.slett-btn:hover {
    background: #c82333;
}

/* Meldinger */
.success-msg, .error-msg {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

.success-msg {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-msg {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}