/**
 * ZHL Video Studio - Main Stylesheet
 * Zentrum für Hochschullehre, Universität Bayreuth
 * Primary Color: #009260 (ZHL Green)
 */

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
    color: #2d3748;
}

/* ============================================
   ZHL HEADER
   ============================================ */

.zhl-header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.zhl-header img {
    height: 70px;
    width: auto;
    display: block;
}

/* ============================================
   CONTAINERS & CARDS
   ============================================ */

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 40px;
    max-width: 550px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
    color: #2d3748;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

h2 {
    color: #2d3748;
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 15px;
}

.subtitle {
    color: #718096;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

p {
    color: #4a5568;
    line-height: 1.6;
}

/* ============================================
   FORMS
   ============================================ */

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

label {
    display: block;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #009260;
    box-shadow: 0 0 0 3px rgba(0, 146, 96, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */

button,
.btn {
    background: linear-gradient(135deg, #009260 0%, #007a50 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 146, 96, 0.25);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

button i,
.btn i {
    margin-right: 6px;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 146, 96, 0.35);
}

button:active,
.btn:active {
    transform: translateY(0);
}

button:disabled,
.btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button.btn-full,
.btn.btn-full {
    width: 100%;
}

button.btn-secondary,
.btn.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

button.btn-secondary:hover,
.btn.btn-secondary:hover {
    background: #cbd5e0;
}

/* ============================================
   MESSAGES & ALERTS
   ============================================ */

.message {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
}

.message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   INFO BOXES
   ============================================ */

.info-box {
    background: #f7fafc;
    border-left: 4px solid #009260;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 25px 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.info-box strong {
    color: #2d3748;
    display: block;
    margin-bottom: 5px;
}

/* ============================================
   NOT READY MESSAGE
   ============================================ */

.not-ready-message {
    text-align: center;
    padding: 40px 20px;
}

.not-ready-message .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.not-ready-message h2 {
    color: #e53e3e;
    margin-bottom: 15px;
}

.not-ready-message p {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 10px;
}

/* ============================================
   SESSION PAGE - HEADER
   ============================================ */

.session-header {
    background: linear-gradient(135deg, #009260 0%, #007a50 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 146, 96, 0.2);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.session-header h1 {
    color: white;
    font-size: 28px;
    margin-bottom: 8px;
}

.session-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

/* ============================================
   SESSION PAGE - INFO BAR
   ============================================ */

.session-info {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.session-info-item {
    display: inline-block;
    margin-right: 30px;
    margin-bottom: 10px;
    font-size: 15px;
}

.session-info-item strong {
    color: #009260;
    font-weight: 600;
}

/* ============================================
   SESSION PAGE - VIDEO GRID
   ============================================ */

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    background: #000;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s;
}

.video-thumbnail:hover {
    opacity: 0.85;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #009260 0%, #007a50 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 146, 96, 0.4);
    transition: transform 0.2s;
    pointer-events: none;
}

.video-thumbnail:hover .play-button-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* Good Take Badge */
.good-take-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.4);
    z-index: 10;
    pointer-events: none;
}

.good-take-badge i {
    font-size: 14px;
}

/* Non-good takes styling */
.video-card[data-is-good-take="0"] {
    opacity: 0.6;
}

.video-card[data-is-good-take="0"]:hover {
    opacity: 0.8;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    word-break: break-word;
}

.video-meta {
    font-size: 14px;
    color: #718096;
    margin-bottom: 15px;
}

.video-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.video-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 14px;
}

/* ============================================
   VIDEO PLAYER MODAL
   ============================================ */

.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-player-modal.active {
    display: flex;
}

.video-player-container {
    max-width: 90vw;
    max-height: 90vh;
    min-width: min(600px, 90vw);
    position: relative;
}

.video-player-container video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 10px;
}

.video-player-container audio {
    width: 100%;
    min-width: 600px;
    height: auto;
    border-radius: 10px;
    background: #2d3748;
}

.video-player-container img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
}

.video-player-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.video-player-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-player-title {
    position: absolute;
    top: -40px;
    left: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

/* ============================================
   NO VIDEOS MESSAGE
   ============================================ */

.no-videos {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    max-width: 1400px;
    margin: 0 auto;
}

.no-videos .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-videos h2 {
    color: #4a5568;
    margin-bottom: 10px;
}

.no-videos p {
    color: #718096;
}

/* ============================================
   ADMIN PAGE - STATS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #009260;
}

.stat-card h3 {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-card .value {
    font-size: 32px;
    color: #2d3748;
    font-weight: 700;
}

/* ============================================
   ADMIN PAGE - HEADER
   ============================================ */

.admin-header {
    background: linear-gradient(135deg, #009260 0%, #007a50 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 146, 96, 0.2);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.admin-header h1 {
    color: white;
    font-size: 26px;
    margin: 0;
}

.admin-header .btn {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.admin-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   ADMIN PAGE - TABLE
   ============================================ */

.sessions-table {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    max-width: 1400px;
    margin: 0 auto 30px;
}

.sessions-table h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 14px 16px;
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

th.sortable:hover {
    color: #009260;
}

th.sortable::after {
    content: ' ⇅';
    opacity: 0.4;
}

th.sort-asc {
    color: #009260;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sort-desc {
    color: #009260;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

tr:hover td {
    background: #f7fafc;
}

td code {
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Monaco', 'Courier New', monospace;
}

td a {
    color: #009260;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

td a:hover {
    color: #007a50;
    text-decoration: underline;
}

td .btn {
    padding: 6px 12px;
    font-size: 13px;
    margin-right: 5px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-container {
    max-width: 450px;
    margin: 60px auto 0;
}

.login-container h1 {
    text-align: center;
    color: #009260;
    margin-bottom: 30px;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .zhl-header {
        padding: 15px 20px;
        margin-bottom: 20px;
    }
    
    .zhl-header img {
        height: 55px;
    }
    
    .container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    .session-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .session-header h1 {
        font-size: 22px;
    }
    
    .session-info-item {
        display: block;
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .admin-header h1 {
        font-size: 22px;
    }
    
    .sessions-table {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .video-actions .btn {
        width: 100%;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
