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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    color: #1a1a1a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #00aeef;
    font-size: 2.6em;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

header p {
    color: #555;
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1em;
    color: #666;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #00aeef;
}

.tab-button.active {
    color: #00aeef;
    border-bottom-color: #00aeef;
    font-weight: bold;
}

.tab-content {
    display: none;
}

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

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #00aeef;
    color: #fff;
    border-radius: 4px;
    box-shadow: none;
    border: none;
}

.btn-primary:hover {
    background: #008ac4;
    box-shadow: 0 2px 8px rgba(0, 174, 239, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: #00aeef;
    border-radius: 4px;
    border: 2px solid #00aeef;
}

.btn-secondary:hover {
    background: #00aeef;
    color: #fff;
    border-color: #00aeef;
}

.btn-danger {
    background: #a8005c;
    color: white;
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 4px;
}

.btn-danger:hover {
    background: #85004a;
}

/* Bingo Card */
.bingo-card {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px;
    background: #fff;
    border-radius: 4px;
    aspect-ratio: 5 / 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    transition: box-shadow 0.3s;
}

.bingo-cell {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.05em;
    font-weight: 500;
    color: #1a1a1a;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    overflow: hidden;
}

.bingo-cell:hover:not(.free-cell) {
    border-color: #00aeef;
    background: #f0f9ff;
    box-shadow: 0 2px 4px rgba(0, 174, 239, 0.2);
}

.bingo-cell.marked {
    background: #00aeef;
    color: #fff;
    border-color: #00aeef;
}

.bingo-cell.marked::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.35em;
    color: #fff;
}

/* .bingo-cell.free-cell entfernt, da das Feature nicht mehr genutzt wird */

.placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 1.2em;
    padding: 40px;
}

/* Error Message */
.error-message {
    color: #ff4757;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    min-height: 24px;
}

/* Words Section */
.words-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 10px;
}

.words-section h2 {
    color: #00aeef;
    margin-bottom: 18px;
    font-size: 1.6em;
    font-weight: 600;
}

.add-word-form {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.add-word-form input {
    flex: 1;
    min-width: 200px;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.add-word-form input:focus {
    outline: none;
    border-color: #00aeef;
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.15);
}

#add-word-message {
    min-height: 28px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.95em;
    padding: 8px 0;
}

#add-word-message.success {
    color: #2ecc71;
}

#add-word-message.error {
    color: #ff4757;
}

.words-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
    gap: 12px;
}

.word-item:hover {
    background: #f9f9f9;
    border-color: #00aeef;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.word-item span {
    flex: 1;
    word-break: break-word;
    color: #1a1a1a;
    font-weight: 400;
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bingo-card {
        max-width: 750px;
        aspect-ratio: 5 / 3;
    }

    .bingo-cell {
        font-size: 0.8em;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .bingo-card {
        gap: 8px;
        padding: 12px;
        max-width: 600px;
        aspect-ratio: 5 / 3;
    }

    .bingo-cell {
        font-size: 0.7em;
        padding: 6px;
        line-height: 1.2;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Wörter-Verwaltung Mobile */
    .words-section {
        padding: 0 5px;
    }

    .words-section h2 {
        font-size: 1.4em;
        margin-bottom: 14px;
    }

    .add-word-form {
        flex-direction: column;
        gap: 10px;
    }

    .add-word-form input {
        width: 100%;
        min-width: unset;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    .words-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .word-item {
        padding: 12px 14px;
        flex-wrap: wrap;
    }

    .word-item span {
        font-size: 0.95em;
        margin-bottom: 4px;
    }

    .btn-danger {
        font-size: 0.85em;
        padding: 8px 14px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .bingo-card {
        gap: 5px;
        padding: 8px;
        aspect-ratio: 5 / 3;
    }

    .bingo-cell {
        font-size: 0.58em;
        padding: 4px;
        border-width: 2px;
        line-height: 1.15;
    }

    .bingo-cell.marked::after {
        font-size: 1em;
        top: 2px;
        right: 2px;
    }

    /* Wörter-Verwaltung Extra Small Mobile */
    .words-section h2 {
        font-size: 1.2em;
    }

    .add-word-form input {
        padding: 12px 14px;
    }

    .word-item {
        padding: 10px 12px;
    }

    .word-item span {
        font-size: 0.9em;
    }

    .btn-danger {
        font-size: 0.8em;
        padding: 6px 12px;
    }
}

@media (min-width: 1400px) {
    .bingo-card {
        max-width: 1200px;
        aspect-ratio: 5 / 3;
    }

    .bingo-cell {
        font-size: 1em;
        padding: 12px;
    }
}

/* Print Styles */
/* @media print komplett entfernt – Standarddruck: es wird alles gedruckt */

.print-only {
    display: none;
}
