* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #18181f 0%, #0a0a0c 100%);
    color: #ffffff;
    height: 100vh;
    overflow: hidden; /* BLOKADA SCROLLOWANIA NA EKRANIE KOMPUTERA */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    user-select: none;
    -webkit-user-select: none;
}

/* GŁÓWNY UKŁAD STRONY */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    max-width: 1600px;
    height: 100%;
    max-height: 920px;
    position: relative;
}

/* SYSTEM SLOTÓW */
.panel-slot {
    position: relative;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 2px dashed transparent;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.slot-large {
    height: 100%;
    width: 100%;
}

.sidebar-slots {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 0;
}

.slot-small {
    flex: 1;
    min-height: 0;
}

/* EFEKT NAJECHANIA NA SLOT DOCELOWY W TRAKCIE PRZECIĄGANIA */
.panel-slot.drop-target-active {
    border-color: #f1c40f !important;
    background: rgba(241, 196, 15, 0.08) !important;
    box-shadow: 0 0 30px rgba(241, 196, 15, 0.25), inset 0 0 15px rgba(241, 196, 15, 0.15);
    transform: scale(1.015);
}

.panel-slot.drop-target-active .app-panel {
    opacity: 0.65;
    transform: scale(0.98);
}

/* WSPÓLNE STYLE DLA KAŻDEGO PANELU */
.app-panel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 24px;
    will-change: transform;
    cursor: grab;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.app-panel:active {
    cursor: grabbing;
}

/* UCHWYT DO PRZECIĄGANIA (TYLKO IKONA ⠿) */
.drag-handle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    cursor: grab;
    z-index: 30;
    transition: all 0.2s ease;
}

.drag-handle:hover {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.15);
    border-color: rgba(241, 196, 15, 0.5);
    transform: scale(1.1);
}

.app-panel:hover .drag-handle {
    color: rgba(255, 255, 255, 0.9);
}

/* STAN W TRAKCIE PRZECIĄGANIA - ELEMENT W ORYGINALNYM SLOCIE */
.app-panel.is-dragged-placeholder {
    opacity: 0.22 !important;
    filter: blur(1px);
    border: 2px dashed rgba(241, 196, 15, 0.6) !important;
}

/* ELEMENT PŁYWAJĄCY POD KURSOREM (GHOST) */
#dragGhostContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 999999;
}

.drag-ghost {
    position: fixed !important;
    margin: 0 !important;
    pointer-events: none !important;
    z-index: 999999 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(241, 196, 15, 0.5) !important;
    border: 2px solid #f1c40f !important;
    border-radius: 24px !important;
    opacity: 0.95 !important;
    transform: scale(1.03) rotate(1.5deg);
    cursor: grabbing !important;
    overflow: hidden !important;
    backdrop-filter: blur(14px) !important;
    flex: none !important;
}

.drag-ghost,
.drag-ghost * {
    pointer-events: none !important;
    user-select: none !important;
}

/* WIDŻETY OGÓLNE */
.widget-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 14px 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    text-align: center;
    justify-content: center;
    overflow: hidden;
}

.widget-box:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ========================================================
   1. PANEL SLIDERA (ZDJĘCIA PSA)
   ======================================================== */
.slider-container {
    background-color: #000;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.slides-wrapper {
    flex: 1;
    position: relative;
    background-color: #000;
    overflow: hidden;
    min-height: 0;
}

.slides-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 14px 18px;
    color: white;
    font-size: 22px;
    transition: 0.3s ease;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 0 12px 12px 0;
    z-index: 10;
}
.next { right: 0; border-radius: 12px 0 0 12px; }
.prev:hover, .next:hover { background-color: rgba(241, 196, 15, 0.85); color: #000; }

.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.12);
    z-index: 10;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #f1c40f;
    box-shadow: 0 0 10px #f1c40f;
}

.top-controls {
    position: absolute;
    top: 12px;
    right: 52px; /* Zostawia miejsce na drag-handle */
    display: flex;
    gap: 10px;
    z-index: 10;
}

.top-controls button {
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
    transition: 0.25s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-controls button:hover {
    background-color: rgba(241, 196, 15, 0.9);
    border-color: #f1c40f;
    color: #000;
}

.thumbnails-container {
    height: 85px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    background-color: rgba(10, 10, 12, 0.95);
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.thumbnails-container::-webkit-scrollbar { display: none; }

.thumbnail {
    cursor: pointer;
    height: 55px;
    width: 85px;
    object-fit: cover;
    opacity: 0.35;
    transition: all 0.35s ease;
    border-radius: 8px;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.active-thumb, .thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: #f1c40f;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.35);
}

/* SLIDER W MAŁYM SLOCIE (KOMPAKTOWY) - TYLKO GDY NIE JEST W TRYBIE PEŁNOEKRANOWYM */
.slot-small .slider-container:not(:fullscreen):not(:-webkit-full-screen) .slide img {
    object-fit: cover;
}
.slot-small .slider-container:not(:fullscreen):not(:-webkit-full-screen) .thumbnails-container {
    height: 44px;
    padding: 0 10px;
    gap: 6px;
}
.slot-small .slider-container:not(:fullscreen):not(:-webkit-full-screen) .thumbnail {
    height: 30px;
    width: 48px;
}
.slot-small .slider-container:not(:fullscreen):not(:-webkit-full-screen) .prev,
.slot-small .slider-container:not(:fullscreen):not(:-webkit-full-screen) .next {
    padding: 8px 12px;
    font-size: 16px;
}
.slot-small .slider-container:not(:fullscreen):not(:-webkit-full-screen) .top-controls button {
    width: 30px;
    height: 30px;
    font-size: 13px;
    border-radius: 8px;
}

/* TRYB PEŁNOEKRANOWY SLIDERA (ZDJĘCIA ZAWSZE W CAŁOŚCI BEZ PRZYCINANIA) */
.slider-container:fullscreen,
.slider-container:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    background-color: #000 !important;
}

.slider-container:fullscreen .slide img,
.slider-container:-webkit-full-screen .slide img {
    object-fit: contain !important;
}

.slider-container:fullscreen .thumbnails-container,
.slider-container:-webkit-full-screen .thumbnails-container {
    height: 85px !important;
    padding: 0 15px !important;
    gap: 10px !important;
}

.slider-container:fullscreen .thumbnail,
.slider-container:-webkit-full-screen .thumbnail {
    height: 55px !important;
    width: 85px !important;
}

.slider-container:fullscreen .prev,
.slider-container:fullscreen .next,
.slider-container:-webkit-full-screen .prev,
.slider-container:-webkit-full-screen .next {
    padding: 14px 18px !important;
    font-size: 22px !important;
}

.slider-container:fullscreen .top-controls,
.slider-container:-webkit-full-screen .top-controls {
    top: 20px !important;
    right: 20px !important;
}

.slider-container:fullscreen .top-controls button,
.slider-container:-webkit-full-screen .top-controls button {
    width: 44px !important;
    height: 44px !important;
    font-size: 18px !important;
    border-radius: 12px !important;
}

/* ========================================================
   2. PANEL: LICZNIK WIEKU
   ======================================================== */
.age-widget h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.age-widget h2 span {
    color: #f1c40f;
}

.widget-subtitle {
    display: none;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 24px;
}

.age-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
}

.time-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: 0.25s;
}

.time-box:hover {
    background: rgba(241, 196, 15, 0.12);
    border-color: rgba(241, 196, 15, 0.35);
    transform: translateY(-2px);
}

.time-box span:first-child {
    font-size: 18px;
    font-weight: 800;
    color: #f1c40f;
    display: block;
    line-height: 1.15;
}

.time-box .label {
    font-size: 9px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.age-footer {
    display: none;
    margin-top: 25px;
}

.badge {
    background: rgba(241, 196, 15, 0.12);
    border: 1px solid rgba(241, 196, 15, 0.3);
    padding: 8px 20px;
    border-radius: 30px;
    color: #f1c40f;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
}

/* WIEK W DUŻYM SLOCIE (POWIĘKSZONY) */
.slot-large .age-widget {
    padding: 40px;
    justify-content: center;
}

.slot-large .age-widget h2 {
    font-size: 34px;
    margin-bottom: 8px;
}

.slot-large .age-widget .widget-subtitle {
    display: block;
    font-size: 16px;
    color: #bbb;
    margin-bottom: 35px;
}

.slot-large .age-widget .age-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    max-width: 950px;
    margin: 0 auto;
}

.slot-large .age-widget .time-box {
    padding: 24px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.slot-large .age-widget .time-box span:first-child {
    font-size: 44px;
    text-shadow: 0 0 25px rgba(241, 196, 15, 0.4);
}

.slot-large .age-widget .time-box .label {
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 6px;
}

.slot-large .age-widget .age-footer {
    display: block;
}

/* ========================================================
   3. PANEL: MYŚL DNIA
   ======================================================== */
.quote-widget {
    position: relative;
    padding: 14px 18px;
}

.quote-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.quote-header h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f1c40f;
    font-weight: 600;
}

.quote-refresh-btn {
    display: none;
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.35);
    color: #f1c40f;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.quote-refresh-btn:hover {
    background: #f1c40f;
    color: #000;
    transform: scale(1.05);
}

.quote-body {
    position: relative;
    padding: 0 8px;
}

.quote-mark {
    display: none;
    font-size: 60px;
    font-family: Georgia, serif;
    color: rgba(241, 196, 15, 0.25);
    position: absolute;
    line-height: 0;
}
.quote-open { top: 10px; left: -10px; }
.quote-close { bottom: 0; right: -10px; }

.quote-widget p {
    font-size: 13.5px;
    font-style: italic;
    color: #e0e0e0;
    line-height: 1.45;
}

.quote-author {
    display: none;
    margin-top: 20px;
    font-size: 15px;
    color: #f1c40f;
    font-weight: 600;
}

/* CYTAT W DUŻYM SLOCIE (POWIĘKSZONY) */
.slot-large .quote-widget {
    padding: 50px 60px;
}

.slot-large .quote-widget .quote-header {
    margin-bottom: 30px;
    gap: 18px;
}

.slot-large .quote-widget .quote-header h3 {
    font-size: 16px;
    letter-spacing: 3px;
}

.slot-large .quote-widget .quote-refresh-btn {
    display: inline-flex;
    font-size: 13px;
    padding: 8px 18px;
}

.slot-large .quote-widget .quote-mark {
    display: block;
}

.slot-large .quote-widget .quote-body {
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 40px;
}

.slot-large .quote-widget p {
    font-size: 28px;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.slot-large .quote-widget .quote-author {
    display: block;
}

/* ========================================================
   4. PANEL: DAJ PRZYSMAK
   ======================================================== */
.treat-widget {
    position: relative;
    overflow: visible;
}

.treat-inner {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.treat-btn {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #111;
    border: none;
    padding: 11px 22px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.4);
    user-select: none;
    width: 100%;
    max-width: 300px;
}

.treat-btn:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 12px 30px rgba(241, 196, 15, 0.6);
}

.treat-btn:active {
    transform: scale(0.96);
}

.treat-counter {
    margin-top: 6px;
    font-size: 12px;
    color: #aaa;
    line-height: 1.3;
}

.treat-counter #treatCount {
    color: #f1c40f;
    font-weight: 800;
    font-size: 19px;
    margin: 0 4px;
}

.treat-bonus-bar {
    display: none;
    margin-top: 25px;
    gap: 12px;
}

.treat-tag {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    user-select: none;
}

.treat-tag:hover {
    transform: translateY(-3px) scale(1.06);
    background: rgba(241, 196, 15, 0.2);
    border-color: #f1c40f;
    color: #f1c40f;
}

/* PRZYSMAK W DUŻYM SLOCIE (POWIĘKSZONY) */
.slot-large .treat-widget {
    padding: 50px;
}

.slot-large .treat-widget .treat-btn {
    padding: 22px 45px;
    font-size: 26px;
    max-width: 440px;
}

.slot-large .treat-widget .treat-counter {
    margin-top: 24px;
    font-size: 18px;
}

.slot-large .treat-widget .treat-counter #treatCount {
    font-size: 36px;
}

.slot-large .treat-widget .treat-bonus-bar {
    display: flex;
}

/* ANIMACJA LATAJĄCYCH PRZYSMAKÓW */
.floating-treat {
    position: absolute;
    font-size: 36px;
    pointer-events: none;
    animation: floatUp 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    z-index: 100;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.8) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--offset-x), -180px) scale(1.5) rotate(var(--rotation));
    }
}

/* ========================================================
   5. PANEL: ODTWARZACZ MUZYKI (BEN FM)
   ======================================================== */
.music-widget {
    padding: 12px 16px;
    text-align: left;
    justify-content: center;
}

.music-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 0;
}

.music-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 30px; /* Miejsce na drag-handle */
}

/* Kręcąca się płyta winylowa */
.music-disc {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle, #222 0%, #111 45%, #050507 100%);
    border: 2px solid rgba(241, 196, 15, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(241, 196, 15, 0.15);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinDisc 9s linear infinite;
    animation-play-state: paused;
}

.music-disc.playing {
    animation-play-state: running;
    border-color: #f1c40f;
    box-shadow: 0 4px 16px rgba(241, 196, 15, 0.35);
}

.music-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    pointer-events: none;
}

.disc-center {
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #14141a;
    border: 2px solid #f1c40f;
    z-index: 2;
}

@keyframes spinDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.music-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.music-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #f1c40f;
    font-weight: 700;
}

.music-track-counter {
    font-size: 10px;
    color: #888;
    font-weight: 600;
    margin-left: auto;
}

/* Animowany korektor (EQ) */
.music-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}

.music-eq span {
    width: 2.5px;
    height: 3px;
    background: #f1c40f;
    border-radius: 2px;
    transition: height 0.2s ease;
}

.music-eq.playing span:nth-child(1) { animation: eqBounce 0.55s ease-in-out infinite alternate; }
.music-eq.playing span:nth-child(2) { animation: eqBounce 0.4s ease-in-out 0.15s infinite alternate; }
.music-eq.playing span:nth-child(3) { animation: eqBounce 0.65s ease-in-out 0.25s infinite alternate; }
.music-eq.playing span:nth-child(4) { animation: eqBounce 0.48s ease-in-out 0.08s infinite alternate; }

@keyframes eqBounce {
    0% { height: 3px; opacity: 0.6; }
    100% { height: 11px; opacity: 1; }
}

.music-title-wrap {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.music-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-subtitle {
    display: none;
    font-size: 11px;
    color: #888;
}

/* Pasek przewijania utworu */
.music-progress-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

.music-range {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
}

.music-range:hover {
    background: rgba(255, 255, 255, 0.22);
}

.music-range::-moz-range-track {
    background: transparent;
    border: none;
    height: 5px;
    border-radius: 6px;
}

.music-range::-moz-focus-outer {
    border: 0;
}

.music-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #f1c40f;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.7);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.music-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.music-range::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #f1c40f;
    border: none;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.7);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.music-range::-moz-range-thumb:hover {
    transform: scale(1.25);
}

.music-times {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #888;
    font-weight: 600;
}

/* Przyciski sterowania */
.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.music-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.music-btn:hover {
    background: rgba(241, 196, 15, 0.18);
    border-color: rgba(241, 196, 15, 0.5);
    color: #f1c40f;
    transform: translateY(-1px);
}

.music-btn:active {
    transform: scale(0.93);
}

.music-btn-sm {
    width: 28px;
    height: 28px;
    color: #999;
}

.music-btn.active {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.16);
    border-color: rgba(241, 196, 15, 0.45);
}

.repeat-one-badge {
    display: none;
    position: absolute;
    top: -3px;
    right: -3px;
    background: #f1c40f;
    color: #000;
    font-size: 8px;
    font-weight: 800;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.repeat-one-badge.show {
    display: flex;
}

.music-btn-play {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #111;
    border: none;
    box-shadow: 0 6px 18px rgba(241, 196, 15, 0.4);
}

.music-btn-play:hover {
    background: linear-gradient(135deg, #f7d038, #f39c12);
    color: #000;
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(241, 196, 15, 0.6);
}

/* Dolny pasek: głośność + przycisk wczytania MP3 */
.music-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

.music-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 150px;
}

.music-mute-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    transition: color 0.2s;
}

.music-mute-btn:hover {
    color: #f1c40f;
}

.music-volume {
    height: 4px;
}

.music-folder-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ccc;
    padding: 4px 10px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.music-folder-btn:hover {
    background: rgba(241, 196, 15, 0.18);
    border-color: #f1c40f;
    color: #f1c40f;
}

/* Playlista (domyślnie ukryta w małym slocie, widoczna w dużym slocie i na telefonie) */
.music-playlist-container {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
}

.music-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.music-playlist {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.music-playlist::-webkit-scrollbar {
    width: 5px;
}

.music-playlist::-webkit-scrollbar-thumb {
    background: rgba(241, 196, 15, 0.35);
    border-radius: 6px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #ccc;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.playlist-item.active {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.35);
    color: #f1c40f;
    font-weight: 600;
}

.playlist-item-index {
    font-size: 11px;
    color: #777;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.playlist-item.active .playlist-item-index {
    color: #f1c40f;
}

.playlist-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-empty {
    padding: 18px 12px;
    text-align: center;
    font-size: 12.5px;
    color: #888;
    line-height: 1.5;
}

/* ODTWARZACZ MUZYKI W DUŻYM SLOCIE (POWIĘKSZONY WIDOK STUDIO) */
.slot-large .music-widget {
    padding: 36px 46px;
}

.slot-large .music-widget .music-inner {
    max-width: 780px;
    margin: 0 auto;
    gap: 18px;
}

.slot-large .music-widget .music-top {
    gap: 24px;
    padding-right: 0;
}

.slot-large .music-widget .music-disc {
    width: 110px;
    height: 110px;
    border-width: 3px;
}

.slot-large .music-widget .disc-center {
    width: 26px;
    height: 26px;
    border-width: 3px;
}

.slot-large .music-widget .music-label {
    font-size: 13px;
    letter-spacing: 2.5px;
}

.slot-large .music-widget .music-track-counter {
    font-size: 13px;
}

.slot-large .music-widget .music-title {
    font-size: 26px;
    margin: 4px 0;
}

.slot-large .music-widget .music-subtitle {
    display: block;
    font-size: 13px;
}

.slot-large .music-widget .music-range.music-seek {
    height: 7px;
}

.slot-large .music-widget .music-times {
    font-size: 12px;
    margin-top: 4px;
}

.slot-large .music-widget .music-controls {
    gap: 18px;
}

.slot-large .music-widget .music-btn {
    width: 48px;
    height: 48px;
}

.slot-large .music-widget .music-btn-sm {
    width: 38px;
    height: 38px;
}

.slot-large .music-widget .music-btn-play {
    width: 64px;
    height: 64px;
}

.slot-large .music-widget .music-btn-play svg {
    width: 32px;
    height: 32px;
}

.slot-large .music-widget .music-volume-wrap {
    max-width: 220px;
}

.slot-large .music-widget .music-folder-btn {
    padding: 7px 16px;
    font-size: 12.5px;
}

.slot-large .music-widget .music-playlist-container {
    display: flex;
}

/* PRZYCISK RESETOWANIA UKŁADU */
.reset-layout-btn {
    position: fixed;
    bottom: 18px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(20, 20, 26, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 8px 16px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reset-layout-btn:hover {
    color: #f1c40f;
    border-color: rgba(241, 196, 15, 0.4);
    background: rgba(30, 30, 40, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.2);
}

.reset-layout-btn svg {
    transition: transform 0.4s ease;
}

.reset-layout-btn:hover svg {
    transform: rotate(-180deg);
}

/* RESPONSYWNOŚĆ NA TELEFONY I MNIEJSZE EKRANY */
@media (max-width: 950px) {
    body {
        height: auto !important;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto !important;
        display: block !important;
        padding: 12px 12px 85px 12px !important; /* Dolny padding chroni przed przyciskiem resetu */
    }

    .app-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
    }

    .sidebar-slots {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        height: auto !important;
        min-height: unset !important;
    }

    .panel-slot {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        flex: none !important;
    }

    /* UCHWYT DRAG-HANDLE NA TELEFONACH (WYGODNY DO DOTYKU) */
    .drag-handle {
        top: 10px !important;
        right: 10px !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.65) !important;
        border-color: rgba(255, 255, 255, 0.18) !important;
        color: #f1c40f !important;
        touch-action: none !important;
    }

    /* 1. SLIDER NA TELEFONIE */
    .slider-container {
        height: 380px !important;
        border-radius: 20px !important;
    }

    .slider-container .slide img {
        object-fit: cover !important;
    }

    .slider-container:fullscreen .slide img,
    .slider-container:-webkit-full-screen .slide img {
        object-fit: contain !important;
    }

    .slider-container .thumbnails-container {
        height: 52px !important;
        padding: 0 8px !important;
        gap: 6px !important;
    }

    .slider-container .thumbnail {
        height: 36px !important;
        width: 56px !important;
        border-radius: 6px !important;
    }

    .slider-container .prev,
    .slider-container .next {
        padding: 10px 14px !important;
        font-size: 18px !important;
    }

    .slider-container .top-controls {
        top: 10px !important;
        right: 56px !important;
        gap: 8px !important;
    }

    .slider-container .top-controls button {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }

    /* 2. LICZNIK WIEKU NA TELEFONIE */
    .age-widget {
        padding: 22px 14px !important;
        border-radius: 20px !important;
    }

    .age-widget h2 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
        padding-right: 36px;
    }

    .age-widget .widget-subtitle {
        display: block !important;
        font-size: 12px !important;
        margin-bottom: 14px !important;
    }

    /* 3 kolumny x 2 wiersze – idealne dla 6 kafelków na telefonie */
    .age-widget .age-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .age-widget .time-box {
        padding: 10px 2px !important;
        border-radius: 12px !important;
    }

    .age-widget .time-box span:first-child {
        font-size: 22px !important;
        text-shadow: none !important;
    }

    .age-widget .time-box .label {
        font-size: 9px !important;
        letter-spacing: 0.8px !important;
        margin-top: 2px !important;
    }

    .age-widget .age-footer {
        display: block !important;
        margin-top: 14px !important;
    }

    .age-widget .badge {
        font-size: 12px !important;
        padding: 6px 14px !important;
    }

    /* 3. CYTAT DNIA NA TELEFONIE */
    .quote-widget {
        padding: 22px 16px !important;
        border-radius: 20px !important;
    }

    .quote-widget .quote-header {
        margin-bottom: 12px !important;
        gap: 10px !important;
        padding-right: 36px;
    }

    .quote-widget .quote-header h3 {
        font-size: 13px !important;
        letter-spacing: 1.5px !important;
    }

    .quote-widget .quote-refresh-btn {
        display: inline-flex !important;
        font-size: 11px !important;
        padding: 5px 12px !important;
        border-radius: 14px !important;
    }

    .quote-widget .quote-body {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .quote-widget p {
        font-size: 15px !important;
        line-height: 1.55 !important;
    }

    .quote-widget .quote-mark {
        display: none !important;
    }

    .quote-widget .quote-author {
        display: block !important;
        font-size: 12px !important;
        margin-top: 12px !important;
    }

    /* 4. DAJ PRZYSMAK NA TELEFONIE */
    .treat-widget {
        padding: 24px 16px !important;
        border-radius: 20px !important;
    }

    .treat-widget .treat-inner {
        padding-top: 8px;
    }

    .treat-widget .treat-btn {
        padding: 16px 20px !important;
        font-size: 18px !important;
        max-width: 100% !important;
    }

    .treat-widget .treat-counter {
        font-size: 13px !important;
        margin-top: 14px !important;
    }

    .treat-widget .treat-counter #treatCount {
        font-size: 26px !important;
    }

    .treat-widget .treat-bonus-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 16px !important;
    }

    .treat-widget .treat-tag {
        padding: 7px 14px !important;
        font-size: 13px !important;
        border-radius: 18px !important;
    }

    /* 5. ODTWARZACZ MUZYKI NA TELEFONIE */
    .music-widget {
        padding: 20px 16px !important;
        border-radius: 20px !important;
    }

    .music-widget .music-top {
        padding-right: 44px !important;
        gap: 14px !important;
    }

    .music-widget .music-disc {
        width: 54px !important;
        height: 54px !important;
    }

    .music-widget .music-title {
        font-size: 16px !important;
    }

    .music-widget .music-controls {
        gap: 14px !important;
        margin: 6px 0 !important;
    }

    .music-widget .music-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .music-widget .music-btn-sm {
        width: 34px !important;
        height: 34px !important;
    }

    .music-widget .music-btn-play {
        width: 50px !important;
        height: 50px !important;
    }

    .music-widget .music-playlist-container {
        display: flex !important;
        max-height: 180px !important;
        margin-top: 10px !important;
    }

    /* PRZYCISK RESETU NA TELEFONIE */
    .reset-layout-btn {
        bottom: 14px !important;
        right: 14px !important;
        padding: 10px 18px !important;
        font-size: 13px !important;
        background: rgba(18, 18, 24, 0.95) !important;
        border-color: rgba(241, 196, 15, 0.3) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7) !important;
    }

    /* GHOST PODCZAS PRZECIĄGANIA NA TELEFONIE */
    .drag-ghost {
        max-width: 92vw !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(241, 196, 15, 0.4) !important;
    }
}
