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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    text-decoration: none;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.nav-link.active {
    color: #667eea;
    background-color: #e8eaf6;
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-image-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.profile-image-tiny {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
}

/* Login */
.theme-toggle-login {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #667eea;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    text-align: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Controls */
.controls {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: #555;
}

.freeze-control {
    margin-left: auto;
}

.reset-control,
.reset-control-admin {
    display: flex;
    align-items: center;
}

.freeze-warning {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #ffc107;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    background: #6c757d;
    color: white;
    font-size: 0.9rem;
    min-width: auto;
}

.btn-small:hover {
    background: #5a6268;
}

.top-count-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-count-control input {
    width: 60px;
    text-align: center;
    padding: 0.4rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.top-count-control input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    min-width: auto;
}

.top-count-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-count-control input {
    width: 60px;
    text-align: center;
    padding: 0.4rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.top-count-control input:focus {
    outline: none;
    border-color: #667eea;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

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

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.video-player {
    width: 100%;
    background: #000;
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    word-break: break-word;
}

.video-title-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.video-kw {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.video-player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.video-player-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.video-map {
    color: #666;
    font-size: 0.95rem;
}

.rating-container {
    margin-top: 1rem;
}

.rating-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.star-input {
    display: none;
}

.star-label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

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

.rating-display {
    color: #667eea;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Evaluation */
.evaluation-results {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.top-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 100%;
}

.rest-videos-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #444;
}

.rest-videos-title {
    margin-bottom: 1.5rem;
    color: #999;
    font-size: 1.2rem;
}

.rest-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 100%;
}

.evaluation-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 3px solid transparent;
}

.evaluation-video-player {
    width: 100%;
    background: #000;
}

.evaluation-video-player video {
    width: 100%;
    height: auto;
    display: block;
}

.evaluation-content {
    padding: 1rem;
}

.evaluation-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8eaf6;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.average-label {
    font-weight: 500;
    color: #555;
}

.average-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.average-rating-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.average-rating-compact .average-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.average-rating-compact .vote-count {
    font-size: 0.85rem;
    color: #999;
}

.vote-count {
    color: #999;
    font-size: 0.9rem;
}

.user-ratings {
    border-top: 2px solid #f0f0f0;
    padding-top: 1.5rem;
}

.user-ratings h4 {
    margin-bottom: 1rem;
    color: #555;
}

.user-ratings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-rating-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.user-ratings-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.user-rating-item-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-rating-item-compact .user-name {
    font-weight: 500;
    min-width: 100px;
    text-align: left;
}

.user-rating-item-compact .user-rating-stars {
    display: flex;
    gap: 0.15rem;
    align-items: center;
}

.user-rating-item-compact .star-display {
    font-size: 1rem;
    color: #ddd;
    line-height: 1;
}

.user-rating-item-compact .star-display.star-filled {
    color: #ffc107;
}

.user-rating-item-compact .star-display.star-empty {
    color: #555;
    opacity: 0.3;
}

.no-ratings {
    color: #999;
    font-style: italic;
}

.user-name {
    font-weight: 500;
    color: #333;
    margin-right: 0.5rem;
}

.user-rating {
    color: #667eea;
    font-weight: 600;
}

.info-text {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    font-size: 1.1rem;
}

.error-text {
    text-align: center;
    color: #e74c3c;
    padding: 2rem;
    background: #ffeaea;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .freeze-control {
        margin-left: 0;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .evaluation-results {
        grid-template-columns: 1fr;
    }

    .evaluation-header-compact {
        flex-direction: column;
        align-items: flex-start;
    }

    .star-rating {
        justify-content: center;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
}

/* Video-Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.video-modal-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    max-width: 1200px;
    padding: 2rem;
}

.video-modal-content video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-radius: 8px;
}

.video-modal-close {
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.video-modal-close:hover,
.video-modal-close:focus {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.btn-theme {
    background: #6c757d;
    border: none;
    font-size: 1.2rem;
    padding: 0.5rem 0.75rem;
}

.btn-theme:hover {
    background: #5a6268;
}

/* Dunkles Theme */
.dark-theme {
    background: linear-gradient(135deg, #001a1a 0%, #002222 100%);
    color: #e0e0e0;
}

.dark-theme .navbar {
    background-color: rgba(0, 30, 30, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.dark-theme .nav-brand {
    color: #20B2AA;
}

.dark-theme .nav-link {
    color: #b0b0b0;
}

.dark-theme .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .nav-link.active {
    color: #20B2AA;
    background-color: rgba(32, 178, 170, 0.2);
}

.dark-theme .login-box {
    background: #002828;
    color: #e0e0e0;
}

.dark-theme .login-box h1 {
    color: #20B2AA;
}

.dark-theme .form-group label {
    color: #c0c0c0;
}

.dark-theme .form-group input,
.dark-theme .form-group select {
    background: #001f1f;
    border-color: #003d3d;
    color: #e0e0e0;
}

.dark-theme .form-group input:focus,
.dark-theme .form-group select:focus {
    border-color: #20B2AA;
}

.dark-theme .top-count-control input {
    background: #003333;
    border-color: #005555;
    color: #e0e0e0;
}

.dark-theme .top-count-control input:focus {
    border-color: #20B2AA;
}

.dark-theme .controls {
    background: #002828;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark-theme .control-group label {
    color: #c0c0c0;
}

.dark-theme .freeze-warning {
    background: #3d2e1f;
    color: #ffc107;
    border-left-color: #ffc107;
}

.dark-theme .video-card {
    background: #002828;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
}

.dark-theme .video-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* Spielerfarben für Video-Karten */
.dark-theme .video-card.player-chester {
    border-color: #d4853f;
}

.dark-theme .video-card.player-cornyhawk {
    border-color: #CB4ACE;
}

.dark-theme .video-card.player-el-hummel {
    border-color: #ff69b4;
}

.dark-theme .video-card.player-formarco {
    border-color: #21a589;
}

.dark-theme .video-card.player-johnny-b,
.dark-theme .video-card.player-johnny {
    border-color: #e0e879;
}

.dark-theme .video-card.player-mowl {
    border-color: #8ed2f2;
}

.dark-theme .video-info {
    background: #002828;
}

.dark-theme .video-kw {
    color: #20B2AA;
}

.dark-theme .video-player-name {
    color: #e0e0e0;
}

.dark-theme .video-map {
    color: #b0b0b0;
}

.dark-theme .rating-container label {
    color: #c0c0c0;
}

.dark-theme .rating-display {
    color: #20B2AA;
}

.dark-theme .evaluation-card {
    background: #002828;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
}

.dark-theme .evaluation-card.rest-video {
    background: #001a1a;
    opacity: 0.8;
}

.dark-theme .rest-videos-section {
    border-top-color: #555;
}

.dark-theme .rest-videos-title {
    color: #888;
}

/* Spielerfarben für Evaluation-Karten */
.dark-theme .evaluation-card.player-chester {
    border-color: #d4853f;
}

.dark-theme .evaluation-card.player-cornyhawk {
    border-color: #CB4ACE;
}

.dark-theme .evaluation-card.player-el-hummel {
    border-color: #ff69b4;
}

.dark-theme .evaluation-card.player-formarco {
    border-color: #21a589;
}

.dark-theme .evaluation-card.player-johnny-b,
.dark-theme .evaluation-card.player-johnny {
    border-color: #e0e879;
}

.dark-theme .evaluation-card.player-mowl {
    border-color: #8ed2f2;
}

.dark-theme .average-rating {
    background: rgba(32, 178, 170, 0.2);
}

.dark-theme .average-label {
    color: #c0c0c0;
}

.dark-theme .average-value {
    color: #20B2AA;
}

.dark-theme .vote-count {
    color: #888;
}

.dark-theme .user-ratings {
    border-top-color: #444;
}

.dark-theme .user-ratings h4 {
    color: #c0c0c0;
}

.dark-theme .user-rating-item {
    background: #001f1f;
}

.dark-theme .user-name {
    color: #e0e0e0;
}

.dark-theme .user-rating {
    color: #20B2AA;
}

.dark-theme .user-ratings-compact {
    color: #b0b0b0;
}

.dark-theme .user-rating-item-compact .user-name {
    color: #c0c0c0;
}

.dark-theme .user-rating-item-compact .star-display.star-filled {
    color: #ffc107;
}

.dark-theme .user-rating-item-compact .star-display.star-empty {
    color: #666;
    opacity: 0.4;
}

.dark-theme .no-ratings {
    color: #888;
}

.dark-theme .info-text {
    background: #002828;
    color: #b0b0b0;
}

.dark-theme .error-text {
    background: #3d1e1e;
    color: #ff6b6b;
}

.dark-theme .modal-content {
    background-color: #002828;
    color: #e0e0e0;
}

.dark-theme .modal-close {
    color: #888;
}

.dark-theme .modal-close:hover,
.dark-theme .modal-close:focus {
    color: #fff;
}

.dark-theme .video-modal-close {
    color: #fff;
}

.dark-theme .video-modal-close:hover,
.dark-theme .video-modal-close:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

