/* EVDle - Spieler Ratespiel */

.evdle-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.evdle-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #8B0000, #FF4500);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 4px 20px rgba(204, 0, 0, 0.3);
}

.evdle-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #CC0000, #FF4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
}

.evdle-header p {
    color: #b0b0b0;
    font-size: 1.1rem;
}

/* Search */
.evdle-search-wrapper {
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
}

.evdle-search-box {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease;
}

.evdle-search-box:focus-within {
    border-color: #CC0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15);
}

.evdle-search-box i {
    color: #666;
    font-size: 1rem;
    margin-right: 0.75rem;
}

.evdle-search-box input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.evdle-search-box input::placeholder {
    color: #666;
}

.evdle-guess-btn {
    background: linear-gradient(135deg, #8B0000, #CC0000);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.evdle-guess-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #CC0000, #FF4500);
    transform: scale(1.05);
}

.evdle-guess-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Autocomplete */
.evdle-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.evdle-autocomplete.active {
    display: block;
}

.evdle-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #222;
}

.evdle-autocomplete-item:last-child {
    border-bottom: none;
}

.evdle-autocomplete-item:hover {
    background: #252525;
}

.evdle-autocomplete-item.selected {
    background: #252525;
}

.evdle-autocomplete-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.evdle-autocomplete-item .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #999;
    flex-shrink: 0;
}

.evdle-autocomplete-item .player-name {
    color: #fff;
    font-weight: 500;
}

/* Table Header */
.evdle-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 0.8fr 1.2fr 1.2fr 1fr 0.9fr 0.9fr;
    gap: 6px;
    max-width: 950px;
    margin: 0 auto 0.5rem;
    padding: 0 0.25rem;
}

.header-cell {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    padding: 0.5rem 0.25rem;
}

/* Guesses */
.evdle-guesses {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.evdle-guess-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 0.8fr 1.2fr 1.2fr 1fr 0.9fr 0.9fr;
    gap: 6px;
    animation: slideInRow 0.4s ease-out;
}

.evdle-cell {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 0.6rem 0.4rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    min-height: 52px;
    position: relative;
    overflow: hidden;
}

.evdle-cell.cell-correct {
    background: #1B5E20;
    animation: flipIn 0.5s ease;
}

.evdle-cell.cell-wrong {
    background: #B71C1C;
    animation: flipIn 0.5s ease;
}

.evdle-cell.cell-higher,
.evdle-cell.cell-lower {
    background: #E65100;
    animation: flipIn 0.5s ease;
}

.evdle-cell .cell-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.evdle-cell .arrow {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Player cell (name + photo) */
.evdle-cell.player-cell {
    justify-content: flex-start;
    gap: 0.5rem;
    padding-left: 0.6rem;
}

.evdle-cell.player-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.evdle-cell.player-cell .player-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.evdle-cell.player-cell .player-name-text {
    font-weight: 600;
    font-size: 0.8rem;
    text-align: left;
    line-height: 1.2;
}

/* Animations */
@keyframes slideInRow {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flipIn {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    50% {
        transform: scaleY(1.05);
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Animation delays for cells in a row */
.evdle-guess-row .evdle-cell:nth-child(1) { animation-delay: 0s; }
.evdle-guess-row .evdle-cell:nth-child(2) { animation-delay: 0.08s; }
.evdle-guess-row .evdle-cell:nth-child(3) { animation-delay: 0.16s; }
.evdle-guess-row .evdle-cell:nth-child(4) { animation-delay: 0.24s; }
.evdle-guess-row .evdle-cell:nth-child(5) { animation-delay: 0.32s; }
.evdle-guess-row .evdle-cell:nth-child(6) { animation-delay: 0.40s; }
.evdle-guess-row .evdle-cell:nth-child(7) { animation-delay: 0.48s; }
.evdle-guess-row .evdle-cell:nth-child(8) { animation-delay: 0.56s; }
.evdle-guess-row .evdle-cell:nth-child(9) { animation-delay: 0.64s; }
.evdle-guess-row .evdle-cell:nth-child(10) { animation-delay: 0.72s; }

/* No Game */
.evdle-no-game {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.evdle-no-game i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.evdle-no-game p {
    font-size: 1.1rem;
}

/* Footer Info (Stats + Countdown) */
.evdle-footer-info {
    max-width: 500px;
    margin: 2rem auto 0;
    text-align: center;
}

.evdle-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.evdle-stat {
    text-align: center;
}

.evdle-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.evdle-stat .stat-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.evdle-countdown {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    border: 1px solid #333;
}

.evdle-countdown .countdown-label {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.evdle-countdown .countdown-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #CC0000;
    font-variant-numeric: tabular-nums;
}

/* Win Modal */
.evdle-win-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.evdle-win-modal.active {
    display: flex;
}

.evdle-win-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.evdle-win-content h2 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #CC0000, #FF4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.evdle-win-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #222;
    border-radius: 12px;
}

.evdle-win-player img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #CC0000;
}

.evdle-win-player .win-player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B0000, #CC0000);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    border: 3px solid #CC0000;
}

.evdle-win-player .win-player-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.evdle-win-attempts {
    color: #b0b0b0;
    margin-bottom: 1.5rem;
}

.evdle-win-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.evdle-win-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-share {
    background: linear-gradient(135deg, #8B0000, #CC0000);
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(204, 0, 0, 0.3);
}

.btn-close-win {
    background: none;
    border: 1px solid #333;
    color: #999;
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-close-win:hover {
    border-color: #666;
    color: #fff;
}

/* Confetti */
.evdle-win-confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall 2.5s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Game Won State */
.evdle-search-wrapper.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Toast */
.evdle-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 2000;
    animation: toastIn 0.3s ease-out;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .evdle-header h1 {
        font-size: 2rem;
    }

    .evdle-header p {
        font-size: 0.95rem;
    }

    .evdle-logo {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .evdle-table-header {
        grid-template-columns: 1.5fr 0.8fr 1fr 0.8fr 0.6fr 1fr 1fr 0.8fr 0.7fr 0.7fr;
    }

    .evdle-guess-row {
        grid-template-columns: 1.5fr 0.8fr 1fr 0.8fr 0.6fr 1fr 1fr 0.8fr 0.7fr 0.7fr;
    }

    .header-cell {
        font-size: 0.6rem;
        padding: 0.4rem 0.15rem;
    }

    .evdle-cell {
        font-size: 0.7rem;
        padding: 0.4rem 0.2rem;
        min-height: 44px;
        border-radius: 6px;
    }

    .evdle-cell.player-cell {
        padding-left: 0.3rem;
        gap: 0.3rem;
    }

    .evdle-cell.player-cell img,
    .evdle-cell.player-cell .player-avatar-small {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .evdle-cell.player-cell .player-name-text {
        font-size: 0.65rem;
    }

    .evdle-stats {
        gap: 1rem;
    }

    .evdle-stat .stat-value {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .evdle-table-header,
    .evdle-guess-row {
        grid-template-columns: 1.3fr 0.7fr 0.9fr 0.7fr 0.5fr 0.9fr 0.9fr 0.7fr 0.6fr 0.6fr;
        gap: 3px;
    }

    .header-cell {
        font-size: 0.5rem;
    }

    .evdle-cell {
        font-size: 0.6rem;
        padding: 0.3rem 0.15rem;
        min-height: 40px;
    }

    .evdle-cell.player-cell .player-name-text {
        font-size: 0.6rem;
    }

    .evdle-cell .arrow {
        font-size: 0.6rem;
    }
}

/* ==================== Category Descriptions ==================== */
.evdle-categories-info {
    max-width: 700px;
    margin: 2.5rem auto 0;
    padding: 0 1rem;
}

.evdle-categories-info h3 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.evdle-categories-info h3 i {
    color: #CC0000;
    margin-right: 0.4rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.category-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 0.8rem 1rem;
}

.category-card .cat-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #CC0000;
    margin-bottom: 0.25rem;
}

.category-card .cat-desc {
    font-size: 0.78rem;
    color: #b0b0b0;
    line-height: 1.4;
}

/* ==================== Suggestion Section ==================== */
.evdle-suggestion-section {
    max-width: 500px;
    margin: 2.5rem auto 0;
    padding: 0 1rem 2rem;
}

.evdle-suggestion-section h3 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #fff;
}

.evdle-suggestion-section h3 i {
    color: #FF9900;
    margin-right: 0.4rem;
}

.suggestion-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.suggestion-inputs {
    display: flex;
    gap: 0.5rem;
}

.suggestion-inputs input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.suggestion-inputs input:focus {
    border-color: #CC0000;
}

.suggestion-inputs input::placeholder {
    color: #666;
}

.btn-suggestion-submit {
    background: linear-gradient(135deg, #CC0000, #8B0000);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-suggestion-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-suggestion-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.suggestion-feedback {
    text-align: center;
    font-size: 0.85rem;
    min-height: 1.2rem;
    margin-top: 0.3rem;
}

.suggestion-feedback.success {
    color: #4CAF50;
}

.suggestion-feedback.error {
    color: #ff4444;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .suggestion-inputs {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .evdle-categories-info,
    .evdle-suggestion-section {
        padding: 0 0.5rem;
    }

    .category-card {
        padding: 0.6rem 0.8rem;
    }

    .category-card .cat-label {
        font-size: 0.8rem;
    }

    .category-card .cat-desc {
        font-size: 0.72rem;
    }
}
