/* Step 66 - Kaffee-Duell eigener Bereich */
.dashboard-coffee-duel-panel {
    grid-column: 2;
    width: 100%;
    min-width: 0;
}

.coffee-duel-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.coffee-duel-page-shell {
    max-width: 1320px;
}

.coffee-duel-hero,
.coffee-history-shell,
.coffee-duel-active-counter,
.coffee-duel-card,
.coffee-duel-empty-card,
.coffee-history-item,
.coffee-history-empty {
    border: 1px solid rgba(91, 184, 255, 0.28);
    background: linear-gradient(180deg, rgba(5, 17, 33, 0.92), rgba(2, 8, 18, 0.96));
    box-shadow: inset 0 0 18px rgba(73, 168, 255, 0.05), 0 12px 24px rgba(0, 0, 0, 0.22);
}

.coffee-duel-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 108px;
    padding: 22px 24px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.coffee-duel-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(3, 17, 35, 0.62), rgba(3, 17, 35, 0.36)),
        url("images/dashboard/dashboard-kaffee-duell-bg.png") center/cover no-repeat;
    opacity: 0.84;
    z-index: 0;
}

.coffee-duel-hero > * {
    position: relative;
    z-index: 1;
}

.coffee-duel-hero h3,
.coffee-history-head strong {
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.coffee-duel-hero p,
.coffee-history-head small {
    display: block;
    margin: 8px 0 0;
    color: rgba(218, 234, 255, 0.76);
    font-weight: 750;
}

.coffee-duel-primary-action {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 13px;
    border: 1px solid rgba(92, 207, 255, 0.7);
    color: #ffffff;
    font-weight: 950;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(27, 118, 236, 0.98), rgba(7, 46, 122, 0.98));
    box-shadow: 0 0 18px rgba(48, 154, 255, 0.24), inset 0 0 0 1px rgba(213, 246, 255, 0.18);
}

.coffee-duel-active-counter {
    min-height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 240, 255, 0.9);
    font-weight: 850;
}

.coffee-duel-active-counter strong {
    color: #ffca58;
    margin-left: 5px;
}

.coffee-duel-active-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.coffee-duel-active-grid.is-empty {
    grid-template-columns: 1fr;
}

.coffee-duel-card,
.coffee-duel-empty-card {
    border-radius: 20px;
    padding: 16px;
}

.coffee-duel-card {
    min-height: 330px;
    border-color: rgba(92, 207, 255, 0.34);
    background:
        linear-gradient(180deg, rgba(3, 11, 22, 0.35), rgba(1, 6, 14, 0.92)),
        url("images/dashboard/dashboard-kaffee-duell-bg.png") center/cover no-repeat;
}

.coffee-duel-empty-card {
    min-height: 96px;
    color: rgba(221, 236, 255, 0.76);
    font-weight: 800;
    display: flex;
    align-items: center;
}

.coffee-duel-match-box,
.coffee-duel-challenge-match {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(135, 211, 255, 0.22);
    background: rgba(2, 9, 18, 0.7);
    text-align: center;
}

.coffee-duel-match-box strong,
.coffee-duel-challenge-match strong {
    display: block;
    color: #ffffff;
    font-size: 0.98rem;
}

.coffee-duel-match-box span,
.coffee-duel-challenge-match span,
.coffee-duel-match-box small {
    display: block;
    color: rgba(222, 238, 255, 0.76);
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 750;
}

.coffee-duel-vs-row,
.coffee-duel-challenge-vs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 20px;
}

.coffee-duel-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 0;
    text-align: center;
}

.coffee-duel-player-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(92, 207, 255, 0.7);
    background: radial-gradient(circle at 35% 30%, rgba(114, 204, 255, 0.2), rgba(5, 16, 33, 0.98));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 18px rgba(44, 156, 255, 0.3);
}

.coffee-duel-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.coffee-duel-player strong {
    max-width: 100%;
    color: #ffffff;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coffee-duel-player small {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(188, 209, 232, 0.22);
    background: rgba(2, 8, 16, 0.78);
    color: rgba(232, 238, 247, 0.84);
    font-weight: 850;
    font-style: italic;
}

.coffee-duel-vs {
    color: rgba(234, 241, 255, 0.72);
    font-size: 1.32rem;
    font-weight: 950;
    text-align: center;
    text-shadow: 0 0 12px rgba(92, 207, 255, 0.32);
}

.coffee-duel-card-footer {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.coffee-duel-card-actions,
.coffee-duel-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.coffee-duel-status-pill,
.coffee-history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(92, 207, 255, 0.42);
    background: rgba(4, 18, 34, 0.86);
    color: rgba(229, 244, 255, 0.94);
    padding: 0 14px;
    font-weight: 950;
}

.coffee-duel-status-active {
    border-color: rgba(72, 228, 157, 0.52);
    color: #a9ffd4;
}

.coffee-duel-status-waiting {
    border-color: rgba(255, 202, 88, 0.52);
    color: #ffdd8a;
}

.coffee-duel-accept-btn,
.coffee-duel-decline-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 950;
    cursor: pointer;
}

.coffee-duel-accept-btn {
    border: 1px solid rgba(72, 228, 157, 0.62);
    background: linear-gradient(180deg, rgba(17, 154, 95, 0.98), rgba(5, 74, 48, 0.98));
}

.coffee-duel-decline-btn {
    border: 1px solid rgba(255, 91, 76, 0.62);
    background: linear-gradient(180deg, rgba(204, 61, 52, 0.98), rgba(91, 15, 20, 0.98));
}

.coffee-history-shell {
    border-radius: 20px;
    overflow: hidden;
}

.coffee-history-head {
    width: 100%;
    min-height: 72px;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 38px;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.coffee-history-chevron {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(92, 207, 255, 0.42);
    background: rgba(4, 18, 34, 0.86);
    position: relative;
}

.coffee-history-chevron::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #cdefff;
    border-bottom: 2px solid #cdefff;
    transform: translate(-50%, -62%) rotate(45deg);
    transition: transform 0.18s ease;
}

.coffee-history-shell.is-open .coffee-history-chevron::before {
    transform: translate(-50%, -38%) rotate(225deg);
}

.coffee-history-body {
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.coffee-history-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.coffee-history-section h4 {
    margin: 0 0 10px;
    color: #ffffff;
}

.coffee-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.coffee-history-two-col .coffee-history-grid {
    grid-template-columns: 1fr;
}

.coffee-history-item,
.coffee-history-empty {
    border-radius: 14px;
    padding: 13px 14px;
}

.coffee-history-item strong,
.coffee-history-item span,
.coffee-history-item small {
    display: block;
}

.coffee-history-item strong {
    color: #ffffff;
    margin-bottom: 6px;
}

.coffee-history-item span,
.coffee-history-item small,
.coffee-history-empty {
    color: rgba(221, 236, 255, 0.76);
    font-size: 0.85rem;
}

.coffee-duel-modal-content {
    width: min(740px, 94vw);
    border-radius: 24px;
    border-color: rgba(92, 207, 255, 0.42);
    box-shadow: 0 0 32px rgba(42, 166, 255, 0.2), inset 0 0 18px rgba(71, 176, 255, 0.06);
}

.coffee-duel-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.coffee-duel-modal-head h3 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: 1.45rem;
}

.coffee-duel-modal-head p {
    margin: 0;
    color: rgba(218, 234, 255, 0.76);
    font-weight: 750;
}

.coffee-duel-modal-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 13px;
    border: 1px solid rgba(116, 198, 255, 0.34);
    background: rgba(3, 12, 24, 0.72);
    color: rgba(236, 247, 255, 0.96);
    font-size: 1.35rem;
    font-weight: 950;
    cursor: pointer;
}

.coffee-duel-form-grid {
    display: grid;
    gap: 14px;
}

.coffee-duel-field span {
    display: block;
    margin-bottom: 7px;
    color: rgba(224, 240, 255, 0.86);
    font-size: 0.82rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coffee-duel-field select {
    width: 100%;
    min-height: 46px;
    border-radius: 13px;
    border: 1px solid rgba(92, 207, 255, 0.28);
    background: rgba(3, 12, 24, 0.96);
    color: #ffffff;
    padding: 0 13px;
    font-weight: 850;
}

.coffee-duel-form-error {
    border-radius: 12px;
    border: 1px solid rgba(255, 118, 118, 0.42);
    background: rgba(96, 12, 22, 0.24);
    color: rgba(255, 218, 218, 0.95);
    font-weight: 850;
    padding: 10px 12px;
}

.coffee-duel-challenge-content {
    width: min(680px, 94vw);
}

.coffee-duel-challenge-vs {
    margin: 20px 0;
}

.coffee-duel-challenge-actions {
    justify-content: center;
}

@media (max-width: 1180px) {
    .dashboard-coffee-duel-panel {
        grid-column: 1;
    }
}

@media (max-width: 760px) {
    .coffee-duel-hero,
    .coffee-history-head {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .coffee-duel-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .coffee-duel-active-grid,
    .coffee-history-two-col,
    .coffee-history-grid {
        grid-template-columns: 1fr;
    }

    .coffee-duel-vs-row,
    .coffee-duel-challenge-vs {
        grid-template-columns: 1fr;
    }
}
