/* =========================================
   PLAY-TIME LIMIT - "Time for a little break!" screen
   (shown by playtime.js)
========================================= */

/* While on a break only the break screen is visible */
html.pt-locked,
html.pt-locked body {
    overflow: hidden !important;
}

/* ...but keep the homepage's moving sky (clouds / stars / sun & moon) */
html.pt-locked body > *:not(.pt-break):not(.cloud-bg):not(.space-bg):not(.sky-wheel) {
    visibility: hidden !important;
}

.pt-break {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 16px;
    /* pages without the moving sky (e.g. a game page) get a plain sky colour */
    background: linear-gradient(180deg, #6fb8ef 0%, #9fd0f6 40%, #eef7fe 100%);
    font-family: Poppins, Arial, sans-serif;
    color: #333b47;
    visibility: visible !important;
}

.pt-card {
    width: 100%;
    max-width: 730px;
    margin: auto 0;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(10, 40, 80, 0.3);
    text-align: center;
    animation: pt-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Illustration */

.pt-art {
    display: block;
    width: 100%;
    aspect-ratio: 725 / 396;
    object-fit: cover;
    background: #8fd0f5;
}

/* Badges on top of the picture */

.pt-hero {
    position: relative;
}

.pt-badge {
    position: absolute;
    top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.pt-badge-left {
    left: 14px;
    background: #ffc21a;
    color: #2b2100;
}

.pt-badge-right {
    right: 14px;
    background: #ffffff;
    color: #1d2430;
}

.pt-badge-right i {
    color: #0b6b5c;
}

.pt-body {
    padding: 22px 28px 26px;
}

/* Heading */

.pt-title {
    margin: 0;
    font-family: "Luckiest Guy", Poppins, Arial, sans-serif;
    font-weight: 400;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ff6a00;
    text-shadow:
        0 2px 0 #ffd2a8,
        0 4px 10px rgba(255, 106, 0, 0.25);
}

.pt-ml {
    margin: 10px 0 0;
    font-family: "Noto Sans Malayalam", Poppins, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #005d91;
}

.pt-text {
    max-width: 610px;
    margin: 10px auto 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5260;
}

/* Three tip cards */

.pt-tips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 22px;
}

.pt-tip {
    padding: 18px 14px 16px;
    border: 1px solid #e3e7ee;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(30, 50, 80, 0.12);
}

.pt-tip-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #ffffff;
}

.pt-tip-icon.is-blue   { background: #005d91; }
.pt-tip-icon.is-yellow { background: #ffc21a; color: #3a2a00; }
.pt-tip-icon.is-green  { background: #0b6b5c; }

.pt-tip h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1d2430;
}

.pt-tip p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4a5260;
}

/* Rest timer bar */

.pt-timer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 14px 18px;
    border: 1px solid #e3e7ee;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(30, 50, 80, 0.12);
    text-align: left;
}

.pt-timer-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e3e7ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #0b6b5c;
}

.pt-timer-text {
    flex: none;
}

.pt-timer-label {
    font-size: 12px;
    font-weight: 600;
    color: #1d2430;
}

.pt-time {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    color: #111722;
    font-variant-numeric: tabular-nums;
}

.pt-progress {
    flex: 1;
    min-width: 60px;
    margin-left: 8px;
}

.pt-progress-note {
    font-size: 12px;
    color: #6b7380;
    margin-bottom: 6px;
    text-align: right;
}

.pt-bar {
    height: 10px;
    border-radius: 999px;
    background: #eef1f5;
    overflow: hidden;
}

.pt-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #0b6b5c, #2fb89c);
    transition: width 1s linear;
}

@keyframes pt-in {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* Phones */

@media (max-width: 640px) {

    .pt-break {
        padding: 14px 10px;
    }

    .pt-body {
        padding: 18px 16px 20px;
    }

    .pt-badge {
        top: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .pt-badge-left  { left: 10px; }
    .pt-badge-right { right: 10px; }

    .pt-title {
        font-size: 30px;
    }

    .pt-ml {
        font-size: 15px;
    }

    .pt-text {
        font-size: 14px;
    }

    .pt-tips {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pt-tip {
        display: grid;
        grid-template-columns: 42px 1fr;
        column-gap: 12px;
        align-items: center;
        text-align: left;
        padding: 12px 14px;
    }

    .pt-tip-icon {
        grid-row: span 2;
        margin: 0;
    }

    .pt-tip p {
        margin-top: 2px;
    }

    .pt-progress-note {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pt-card { animation: none; }
}

/* Homepage: show the moving day / night sky behind the break card */
.pt-break.pt-sky {
    background: transparent;
}

html[data-theme="dark"] .pt-break:not(.pt-sky) {
    background: linear-gradient(180deg, #050a1a 0%, #0b1430 55%, #120c2a 100%);
}

