/* TheCommunity - Clean and Modern Styles */

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

:root {
    --primary-color: #2e7d32;
    --secondary-color: #66bb6a;
    --accent-color: #4caf50;
    --background-color: #f1f8f4;
    --text-color: #1b5e20;
    --border-color: #a5d6a7;
    --success-color: #2e7d32;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cat-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.cat-image {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-message {
    text-align: center;
    padding: 3rem 1rem;
}

.welcome-message h2 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.welcome-message p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #555;
}

.status {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: 500;
}

#status {
    color: var(--secondary-color);
    font-weight: bold;
}

#status.ready {
    color: var(--success-color);
}

#status.error {
    color: var(--accent-color);
}

/* Chat Container Styles (for future use) */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
}

.input-area {
    display: flex;
    gap: 0.5rem;
}

#message-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

#message-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#send-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

#send-button:hover:not(:disabled) {
    background-color: #2980b9;
}

#send-button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Hangman Game Styles */
.hangman-game {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.hangman-game h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.game-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.hangman-display {
    flex-shrink: 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#hangman-svg {
    display: block;
}

.game-content {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.word-display {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    letter-spacing: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: var(--text-color);
}

.game-message.win {
    background-color: #d4edda;
    color: #155724;
}

.game-message.lose {
    background-color: #f8d7da;
    color: #721c24;
}

.letters-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.letter-button {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.letter-button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.letter-button:active:not(:disabled) {
    transform: translateY(0);
}

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

.letter-button.correct {
    background-color: var(--success-color);
}

.letter-button.wrong {
    background-color: var(--accent-color);
}

.new-game-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.new-game-button:hover {
    background-color: #1a252f;
}

.new-game-button:active {
    transform: scale(0.98);
}

/* Käsekästchen Game Styles */
.kaesekaestchen-game {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.kaesekaestchen-game h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.kaese-instructions-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.kaese-instructions-toggle {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.kaese-instructions-toggle:hover {
    background-color: #2980b9;
}

.kaese-instructions-panel {
    margin-top: 1rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kaese-instructions-panel.hidden {
    display: none;
}

.kaese-instructions-panel h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.kaese-instructions-panel ol {
    margin-left: 1.5rem;
    line-height: 1.8;
}

.kaese-instructions-panel li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.kaese-game-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}

.kaese-current-player,
.kaese-scores {
    font-size: 1.3rem;
    font-weight: 500;
}

.kaese-game-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    min-height: 500px;
}

.kaese-game-board {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kaese-game-board svg {
    max-width: 100%;
    height: auto;
}

.kaese-line {
    transition: stroke 0.2s, opacity 0.2s;
}

.kaese-game-message {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: var(--text-color);
}

.kaese-game-message.win-green {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #00ff00;
}

.kaese-game-message.win-pink {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #ff69b4;
}

.kaese-game-message.tie {
    background-color: #fff3cd;
    color: #856404;
}

.kaese-new-game-button {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.kaese-new-game-button:hover {
    background-color: #1a252f;
}

.kaese-new-game-button:active {
    transform: scale(0.98);
}

.kaese-fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: none;
}

/* Pub Quiz Game Styles */
.pub-quiz-game {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.pub-quiz-game h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.quiz-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}

.quiz-score,
.quiz-progress,
.quiz-timer {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.quiz-timer.warning {
    color: var(--accent-color);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.quiz-question-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-question {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

.quiz-answers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quiz-answer-button {
    padding: 1.2rem;
    font-size: 1.05rem;
    font-weight: 500;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: left;
    line-height: 1.4;
}

.quiz-answer-button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quiz-answer-button:active:not(:disabled) {
    transform: translateY(0);
}

.quiz-answer-button:disabled {
    cursor: not-allowed;
}

.quiz-answer-button.correct {
    background-color: var(--success-color);
    animation: correctAnswer 0.5s ease-out;
}

.quiz-answer-button.wrong {
    background-color: var(--accent-color);
    animation: wrongAnswer 0.3s ease-out;
}

@keyframes correctAnswer {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes wrongAnswer {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.quiz-explanation {
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.quiz-explanation.correct {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.quiz-explanation.wrong {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--accent-color);
}

.quiz-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.quiz-next-button,
.quiz-new-game-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.quiz-next-button:hover,
.quiz-new-game-button:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quiz-next-button:active,
.quiz-new-game-button:active {
    transform: scale(0.98);
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-results h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.quiz-final-score {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cat-image {
        width: 80px;
        height: 80px;
    }

    header h1 {
        font-size: 2rem;
    }

    .welcome-message h2 {
        font-size: 2rem;
    }

    .welcome-message p {
        font-size: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .hangman-game h2 {
        font-size: 1.5rem;
    }

    .game-container {
        flex-direction: column;
        align-items: center;
    }

    .word-display {
        font-size: 1.8rem;
        letter-spacing: 0.3rem;
    }

    .letters-container {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }

    .letter-button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Käsekästchen responsive */
    .kaesekaestchen-game h2 {
        font-size: 1.5rem;
    }

    .kaese-game-board {
        padding: 1rem;
        overflow-x: auto;
    }

    .kaese-current-player,
    .kaese-scores {
        font-size: 1rem;
    }

    .kaese-game-message {
        font-size: 1.1rem;
    }

    /* Pub Quiz responsive */
    .pub-quiz-game h2 {
        font-size: 1.5rem;
    }

    .quiz-game-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .quiz-score,
    .quiz-progress,
    .quiz-timer {
        font-size: 1rem;
    }

    .quiz-question {
        font-size: 1.1rem;
    }

    .quiz-answers {
        grid-template-columns: 1fr;
    }

    .quiz-answer-button {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .quiz-explanation {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .quiz-results h3 {
        font-size: 1.4rem;
    }

    .quiz-final-score {
        font-size: 1.1rem;
    }
}
