.dcf-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dcf-wrap * {
    box-sizing: border-box;
}

.dcf-header {
    text-align: center;
    margin-bottom: 28px;
}

.dcf-header h2 {
    font-size: clamp(26px, 4vw, 42px);
    margin-bottom: 10px;
    line-height: 1.15;
}

.dcf-header p {
    font-size: clamp(14px, 2vw, 18px);
    margin: 0;
}

.dcf-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.dcf-stats div {
    background: #111;
    color: #fff;
    padding: clamp(14px, 2vw, 22px);
    border-radius: 16px;
    text-align: center;
}

.dcf-stats strong {
    display: block;
    font-size: clamp(20px, 2.5vw, 30px);
    line-height: 1.2;
}

.dcf-stats span {
    font-size: 13px;
    opacity: 0.8;
}

.dcf-progress {
    height: 16px;
    background: #e5e5e5;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 18px;
}

#dcfProgressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #111, #d4af37);
    transition: width 0.4s ease;
}

.dcf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}

.dcf-box {
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 5px;
}

.dcf-box.available {
    background: #f2f2f2;
    border: 1px solid #ccc;
}

.dcf-box.selected {
    background: #0073ff;
}

.dcf-box.sold {
    background: #d4af37;
}

.dcf-box.reserved {
    background: #999;
}

.dcf-film-strip {
    width: 100%;
    max-width: 100%;
    max-height: 560px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #050505;
    padding: clamp(10px, 2vw, 22px);
    border-radius: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 7px;
    margin-bottom: 25px;
    -webkit-overflow-scrolling: touch;
}

.dcf-second {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    aspect-ratio: 1 / 1;
    background: #f2f2f2;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    user-select: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    touch-action: manipulation;
    padding: 0;
}

.dcf-second:hover {
    transform: scale(1.08);
}

.dcf-second.selected {
    background: #0073ff;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.8);
}

.dcf-second.sold {
    background: #d4af37;
    color: #111;
    pointer-events: none;
}

.dcf-second.reserved {
    background: #777;
    color: #fff;
    pointer-events: none;
}

.dcf-loading {
    color: #fff;
    grid-column: 1 / -1;
    text-align: center;
}

.dcf-purchase-box {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
    border-radius: 18px;
    padding: 22px;
    position: sticky;
    bottom: 18px;
    z-index: 10;
}

.dcf-purchase-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.dcf-purchase-box p {
    margin: 8px 0;
}

#dcfBuyButton {
    width: 100%;
    border: none;
    background: #111;
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

#dcfBuyButton:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dcf-note {
    font-size: 13px;
    opacity: 0.7;
}

@media (max-width: 1200px) {
    .dcf-film-strip {
        grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
        gap: 6px;
        max-height: 520px;
    }

    .dcf-second {
        min-height: 34px;
        font-size: 9px;
    }
}

@media (max-width: 991px) {
    .dcf-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dcf-film-strip {
        grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
        max-height: 500px;
    }

    .dcf-second {
        min-height: 36px;
        font-size: 9px;
    }
}

@media (max-width: 767px) {
    .dcf-wrap {
        padding-left: 10px;
        padding-right: 10px;
    }

    .dcf-stats {
        gap: 10px;
    }

    .dcf-stats div {
        padding: 14px 10px;
        border-radius: 13px;
    }

    .dcf-legend {
        font-size: 13px;
        gap: 10px;
    }

    .dcf-film-strip {
        grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
        gap: 8px;
        max-height: 58vh;
        border-radius: 16px;
        padding: 12px;
        margin-bottom: 120px;
        overflow-x: hidden;
    }

    .dcf-second {
        min-height: 44px;
        font-size: 10px;
        border-radius: 8px;
    }

    .dcf-second:hover {
        transform: none;
    }

    .dcf-purchase-box {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 9999;
        padding: 14px;
        border-radius: 16px;
    }

    .dcf-purchase-box h3,
    .dcf-note {
        display: none;
    }

    .dcf-purchase-box p {
        display: inline-block;
        width: 49%;
        margin: 0 0 10px;
        font-size: 14px;
    }

    #dcfBuyButton {
        padding: 13px;
        font-size: 15px;
        margin-top: 0;
    }
}

@media (max-width: 420px) {
    .dcf-film-strip {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 7px;
    }

    .dcf-second {
        min-height: 40px;
        font-size: 9px;
    }

    .dcf-purchase-box p {
        font-size: 13px;
    }
}