/* Allgemeine Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
}

body {
    background-color: #1a472a; /* Dunkelgrüner Hintergrund wie eine Schultafel */
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h5v5h-5z' fill='rgba(255,255,255,0.03)' /%3E%3C/svg%3E");
}

.game-container {
    background-color: #143b22;
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
    position: relative;
    border: 8px solid #0e2a18;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#points {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

#points-per-second {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Clicker-Bereich */
.clicker-area {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    position: relative;
    margin-bottom: 30px;
}

.teacher {
    font-size: 100px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease;
    position: relative;
    z-index: 2;
}

.teacher:hover {
    transform: scale(1.05);
}

.teacher:active {
    transform: scale(0.95);
}

.click-value {
    position: absolute;
    font-size: 24px;
    color: rgb(255, 255, 102);
    font-weight: bold;
    animation: floatUp 1s ease-out forwards;
    z-index: 1;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* Tab-System */
.game-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 5px;
}

.tab-button {
    background-color: #0e2a18;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.tab-button:hover {
    background-color: #164225;
}

.tab-button.active {
    background-color: #18512c;
    font-weight: bold;
}

.tab-content {
    background-color: #18512c;
    border-radius: 0 10px 10px 10px;
    padding: 15px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.tab-panel {
    display: none;
}

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

/* Upgrade Items */
.upgrade-item {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.upgrade-item:hover {
    transform: translateX(5px);
    background-color: rgba(255, 255, 255, 0.15);
}

.upgrade-icon {
    font-size: 2rem;
    margin-right: 15px;
    min-width: 50px;
    text-align: center;
}

.upgrade-info {
    flex-grow: 1;
}

.upgrade-info h3 {
    margin-bottom: 3px;
}

.upgrade-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.upgrade-cost {
    font-weight: bold;
    color: rgb(255, 217, 102);
    margin-right: 15px;
}

.buy-button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.buy-button:hover {
    background-color: #5dbd61;
}

.buy-button:disabled {
    background-color: #6b6b6b;
    cursor: not-allowed;
}

/* Code-Eingabe */
#code-input {
    width: 70%;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #164225;
    background-color: rgba(255, 255, 255, 0.9);
    color: #0e2a18;
    font-size: 1rem;
}

#code-submit {
    width: 25%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    background-color: #4caf50;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

#code-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    min-height: 20px;
}

/* Hilfsfunktionen */
.hidden {
    display: none;
}

/* Event-Animationen */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .game-tabs {
        flex-direction: column;
    }

    .tab-button {
        border-radius: 5px;
        margin-bottom: 5px;
    }

    .tab-content {
        border-radius: 5px;
    }

    .upgrade-item {
        flex-direction: column;
        text-align: center;
    }

    .upgrade-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .upgrade-cost {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Special Event Styles */
.event {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.event-emoji {
    font-size: 1.2em;
    margin-right: 5px;
}

/* Motivation Wave Effect */
.motivation-wave .teacher {
    filter: drop-shadow(0 0 8px yellow);
}

.motivation-wave .game-container {
    background-color: #194a2d;
}

/* Cat Event Effect */
.cat-event .teacher:after {
    content: "🐱";
    position: absolute;
    font-size: 40px;
    bottom: -20px;
    right: -20px;
}

/* Burnout Mode Effect */
.burnout-mode .game-container {
    animation: shake 0.5s infinite;
    filter: grayscale(50%);
}

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

.coffee {
    font-size: 1.5em;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s;
}

.coffee:hover {
    transform: scale(1.2);
}