/* youtube_guess.css – Gestaltung nur fuer youtube_guess.html (vorher <style> in der Seite;
   als eigene Datei kann der Browser sie zwischenspeichern). */

/* Specific Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 80% 10%, rgba(210, 64, 46, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 20% 90%, rgba(31, 78, 95, 0.15) 0%, transparent 40%);
    pointer-events: none;
}
/* ── Japanese ink lines (decorative) ── */
.ink-deco {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background: repeating-linear-gradient(90deg,
            #fff 0px, #fff 1px,
            transparent 1px, transparent 40px);
}

.container {
    width: 92%;
    max-width: 900px;
    margin: 40px auto;
    background: var(--card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: 4px 4px 0 var(--rule);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.game-header {
    background: var(--spot);
    color: var(--on-accent);
    padding: 30px;
    text-align: center;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: none;
}

.game-header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--card2);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 20px;
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--ink-3);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary);
}

.content {
    padding: 40px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto 40px;
    background: var(--paper-hi);
    border-radius: var(--radius);
    overflow: hidden;
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    /* Video komplett versteckt - nur Audio */
}

.video-player.active {
    opacity: 1;
    pointer-events: auto;
}

.video-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--paper-hi);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--on-accent);
    text-align: center;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.video-hidden.hidden {
    display: none;
}

.video-hidden-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.video-hidden-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    font-weight: bold;
}

.audio-playing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--paper-hi);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--on-accent);
    text-align: center;
    z-index: 10;
}

.audio-playing.hidden {
    display: none;
}

.audio-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: audioWave 1.5s ease-in-out infinite;
}

@keyframes audioWave {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.audio-text {
    font-size: 1.3em;
    font-weight: bold;
    color: #D2402E;
    margin-bottom: 10px;
}

.audio-hint {
    font-size: 0.95em;
    opacity: 0.8;
}



.visibility-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--secondary);
}

.visibility-slider {
    width: 100%;
    height: 8px;
    border-radius: var(--radius);
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.visibility-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: none;
}

.visibility-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.start-button-section {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
}

.btn-start-video {
    padding: 20px 40px;
    font-size: 1.3em;
    background: var(--success);
    color: var(--on-accent);
    border: none;
    border-radius: var(--radius);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.btn-start-video::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

@media (hover: hover) { .btn-start-video:hover::before {
    width: 300px;
    height: 300px;
} }

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 28px rgba(76, 175, 80, 0.6);
    }
}

@media (hover: hover) { .btn-start-video:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: none;
} }

.btn-start-video:active {
    transform: translateY(0);
}

.hint-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    max-height: 1000px;
    overflow: hidden;
}

.hint-section.disabled {
    opacity: 0.5;
    pointer-events: none;
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
}

.hint-button {
    margin-right: 10px;
}

.hints-remaining {
    font-size: 0.9em;
    color: var(--ink-3);
    margin-top: 10px;
}

.form-section {
    margin: 30px 0;
    transition: all 0.3s ease;
    max-height: 1000px;
    overflow: hidden;
}

.form-section.disabled {
    opacity: 0.5;
    pointer-events: none;
    max-height: 0;
    padding: 0;
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.input-group {
    display: flex;
    gap: 10px;
    position: relative;
}

input[type="text"],
input[type="number"],
select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: none;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 70px;
    background: var(--card);
    border: 2px solid var(--border);
    border-top: none;
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: none;
}

.autocomplete-list.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

@media (hover: hover) { .autocomplete-item:hover {
    background-color: var(--card2);
    color: var(--primary);
} }

.autocomplete-item.selected {
    background-color: var(--primary);
    color: var(--ink);
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: var(--radius);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--ink);
}

@media (hover: hover) { .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: none;
} }

.btn-secondary {
    background: var(--secondary);
    color: var(--ink);
}

@media (hover: hover) { .btn-secondary:hover {
    background: #1F4E5F;
    transform: translateY(-2px);
} }

.btn-success {
    background: var(--success);
    color: var(--ink);
}

@media (hover: hover) { .btn-success:hover {
    background: #45a049;
} }

.btn-danger {
    background: var(--danger);
    color: var(--ink);
}

@media (hover: hover) { .btn-danger:hover {
    background: #D2402E;
} }

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

.btn-full {
    width: 100%;
}

.difficulty-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.difficulty-btn {
    padding: 15px;
    border: 2px solid var(--border);
    background: var(--card2);
    color: var(--text);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

@media (hover: hover) { .difficulty-btn:hover {
    border-color: var(--primary);
} }

.difficulty-btn.selected {
    background: var(--primary);
    color: var(--ink);
    border-color: var(--primary);
}

.difficulty-btn.easy {
    color: var(--success);
}

.difficulty-btn.medium {
    color: var(--warning);
}

.difficulty-btn.hard {
    color: var(--danger);
}

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

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 4px 4px 0 var(--rule);
}

.modal-header {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--primary);
}

.admin-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--ink);
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s ease;
    z-index: 100;
}

@media (hover: hover) { .admin-button:hover {
    transform: scale(1.1);
    box-shadow: none;
} }

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

.admin-tab {
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: var(--ink-3);
    transition: all 0.3s ease;
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.items-list {
    margin-top: 20px;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.item-info {
    flex: 1;
    min-width: 200px;
}

.item-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.item-meta {
    font-size: 0.9em;
    color: var(--ink-3);
}

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

.result-correct {
    color: var(--success);
}

.result-incorrect {
    color: var(--danger);
}

.result-points {
    font-size: 2em;
    font-weight: bold;
    margin: 20px 0;
    color: var(--primary);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .content {
        padding: 20px;
    }

    .stats-bar {
        flex-direction: column;
        gap: 10px;
    }

    .admin-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }

    .modal-content {
        padding: 25px;
    }

    .video-container {
        max-width: 100%;
        height: 250px;
    }

    .autocomplete-list {
        right: 0;
    }

    .btn-start-video {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .video-hidden-text {
        font-size: 1em;
    }

    .video-hidden-icon {
        font-size: 3em;
    }
}

.message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-weight: bold;
}

.message-success {
    background: #c8e6c9;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.message-error {
    background: #ffcdd2;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.message-info {
    background: #bbdefb;
    color: var(--secondary);
    border-left: 4px solid var(--secondary);
}

.message-warning {
    background: #fff3cd;
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.youtube-info {
    font-size: 0.85em;
    color: var(--ink-3);
    margin-top: 8px;
    font-style: italic;
}
