/*
 Theme Name:     TwentyTwentyFive Child
 Template:       twentytwentyfive
 Version:        1.0
*/

/* =========================================
   CASES ARCHIVE
========================================= */

.cases-archive {
    padding: 60px 20px;
}

.cases-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.cases-heading {
    text-align: center;
    margin-bottom: 40px;
    font-size: 42px;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.case-card {
    background: #0b132b;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.case-card:hover {
    transform: translateY(-6px);
    background: #16213e;
}

.case-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    margin: 0 auto 16px;
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
}

.case-card h2 {
    color: #fff;
    text-align: center;
    font-size: 20px;
    margin: 0;
}


/* =========================================
   CASE MODAL
========================================= */

.case-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.case-modal.active {
    display: block;
}

.case-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.case-modal-content {
    position: relative;
    max-width: 1000px;
    width: calc(100% - 40px);
    margin: 60px auto;
    background: #0b132b;
    color: #fff;
    border-radius: 18px;
    padding: 30px;
    z-index: 2;
    box-sizing: border-box;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.case-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
}

#modalCaseTitle {
    margin: 0 0 10px;
    font-size: 34px;
}

#modalCaseText {
    margin: 0 0 24px;
    opacity: 0.85;
}

.modal-items-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.modal-item {
    background: #16213e;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    box-sizing: border-box;
}

.modal-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    margin: 0 0 10px;
    box-sizing: border-box;
}

.modal-item-name {
    font-size: 15px;
    margin-bottom: 6px;
}

.modal-item-rarity {
    font-size: 13px;
    opacity: 0.7;
}

.modal-open-case-btn {
    display: inline-block;
    background: #f59e0b;
    color: #000;
    padding: 14px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}


/* =========================================
   SINGLE CASE
========================================= */

.single-case-page {
    padding: 60px 20px;
}

.single-case-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.single-case-top {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    margin-bottom: 50px;
}

.single-case-top > * {
    min-width: 0;
}

.single-case-logo {
    background: #0b132b;
    border-radius: 18px;
    padding: 24px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.single-case-logo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    margin: 0;
    box-sizing: border-box;
}

.single-case-info {
    min-width: 0;
}

.single-case-title {
    font-size: 56px;
    line-height: 1.05;
    margin: 0 0 16px;
}

.single-case-text {
    font-size: 20px;
    margin: 0 0 24px;
    opacity: 0.8;
}

.single-case-open-btn {
    background: #f3aa14;
    color: #000;
    border: 0;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}

.case-opening-area {
    background: #0b132b;
    border-radius: 18px;
    padding: 30px;
    min-height: 220px;
    margin-bottom: 50px;
    color: #fff;
    box-sizing: border-box;
}

.case-opening-inner {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.case-opening-placeholder {
    text-align: center;
    opacity: 0.7;
    padding: 20px;
}

.single-case-items h2 {
    margin: 0 0 24px;
}

.single-case-items-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.single-case-item {
    background: #16213e;
    color: #fff;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.single-case-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    margin: 0 0 12px;
    box-sizing: border-box;
}

.single-case-item-name {
    font-size: 18px;
    margin-bottom: 8px;
}

.single-case-item-rarity,
.single-case-item-weight {
    font-size: 14px;
    opacity: 0.75;
}


/* =========================================
   BLOCK THEME / TT5 RESETS
========================================= */

.single-case-page img,
.single-case-page figure {
    margin: 0;
}

.single-case-page .wp-block-image {
    margin: 0;
}

.single-case-page h1,
.single-case-page h2,
.single-case-page p {
    max-width: none;
}

.single-case-page .single-case-top,
.single-case-page .case-opening-area,
.single-case-page .single-case-items {
    width: 100%;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1024px) {
    .cases-grid,
    .modal-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .single-case-top {
        grid-template-columns: 1fr;
    }

    .single-case-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cases-grid,
    .modal-items-grid,
    .single-case-items-grid {
        grid-template-columns: 1fr;
    }

    .single-case-title {
        font-size: 38px;
    }
    
    .case-modal-content {
        margin: 20px auto;
        max-height: calc(100vh - 90px);
        padding: 20px;
    }
}

/* =========================================
   RESULT
========================================= */

.case-result {
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}

.case-result-card {
    background: #16213e;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: #fff;
    max-width: 320px;
    width: 100%;
}

.case-result-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    margin: 0 0 14px;
    box-sizing: border-box;
}

.case-result-win-text {
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.case-result-item-name {
    font-size: 24px;
    margin-bottom: 8px;
}

.case-result-item-rarity,
.case-result-item-weight {
    font-size: 14px;
    opacity: 0.8;
}

/* =========================================
   ROLL
========================================= */

.case-roll-wrapper {
    position: relative;
    width: 100%;
}

.case-roll-viewport {
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #111a3d;
    min-height: 180px;
}

.case-roll-track {
    display: flex;
    align-items: stretch;
    padding: 20px;
    will-change: transform;
    transform: translateX(0);
}

.case-roll-item {
    flex: 0 0 180px;
    width: 180px;
    background: #16213e;
    border-radius: 14px;
    padding: 2px;
    text-align: center;
    color: #fff;
    box-sizing: border-box;
}

.case-roll-item img {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    margin: 0 0 10px;
    box-sizing: border-box;
}

.case-roll-item-name {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 6px;
}

.case-roll-item-rarity {
    font-size: 12px;
    opacity: 0.75;
}

.case-roll-marker {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: #f3aa14;
    border-radius: 999px;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 18px rgba(243, 170, 20, 0.6);
}

.case-result {
    margin-top: 24px;
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}

.case-result-card {
    background: #16213e;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: #fff;
    max-width: 320px;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #f3aa14;
    box-shadow: 0 0 24px rgba(243, 170, 20, 0.18);
}

.case-result-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    margin: 0 0 14px;
    box-sizing: border-box;
}

.case-result-win-text {
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.case-result-item-name {
    font-size: 24px;
    margin-bottom: 8px;
}

.case-result-item-rarity,
.case-result-item-weight {
    font-size: 14px;
    opacity: 0.8;
}

.case-roll-item.is-winning {
    border: 2px solid #f3aa14;
    box-shadow: 0 0 18px rgba(243, 170, 20, 0.2);
}

/* =========================================
   HEADER / FOOTER
========================================= */

header.wp-block-template-part,
footer.wp-block-template-part {
    width: 100%;
}

header.wp-block-template-part .wp-block-group,
footer.wp-block-template-part .wp-block-group {
    width: 100%;
    max-width: none;
}

header.wp-block-template-part .wp-block-site-title,
footer.wp-block-template-part .wp-block-site-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

header.wp-block-template-part .wp-block-navigation {
    margin-left: auto;
}

header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content {
    font-size: 18px;
    font-weight: 500;
}

/* =========================================
   LAUTSTÄRKE
========================================= */

.case-volume-control {
    margin-top: 20px;
    max-width: 300px;
}

.case-volume-control label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    opacity: 0.8;
}

.case-volume-control input[type="range"] {
    width: 40%;
    cursor: pointer;
}