/* DQ+ Index Page Styles */
/* Extracted from index.html for better maintainability */

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark body {
    background: linear-gradient(180deg, #000000 0%, #09090b 100%);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s;
}

.dark .glass-panel {
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

[x-cloak] {
    display: none !important;
}

.custom-scroll {
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.custom-scroll::-webkit-scrollbar {
    width: 5px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dark .custom-scroll::-webkit-scrollbar-thumb {
    background: #3f3f46;
}

.custom-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.375rem;
    display: inline-grid;
    place-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.dark .custom-checkbox {
    border-color: #475569;
    background: #1e293b;
}

.custom-checkbox:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.custom-checkbox:checked::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    background: white;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input,
select,
textarea {
    outline: none;
}

/* Animations & Specific UI elements */
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.dark .circle-bg {
    stroke: #27272a;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

.percentage {
    fill: #4f46e5;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-weight: bold;
    font-size: 0.5em;
    text-anchor: middle;
}

.dark .percentage {
    fill: #fff;
}

/* Loading Animations */
.cup-loader {
    width: 80px;
    height: 100px;
    border: 4px solid #4f46e5;
    border-top: none;
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
}

.cup-loader::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 40px;
    border: 4px solid #4f46e5;
    border-left: none;
    border-radius: 0 20px 20px 0;
    top: 10px;
    right: -34px;
}

html[dir="ltr"] .cup-loader::after {
    right: auto;
    left: -34px;
    border-left: 4px solid #4f46e5;
    border-right: none;
    border-radius: 20px 0 0 20px;
}

.liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: #06b6d4;
    transition: height 10s linear;
}

.liquid.filling {
    height: 100%;
}

.bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: absolute;
    bottom: -10px;
    animation: rise 2s infinite ease-in;
}

.bubble:nth-child(1) {
    left: 20%;
    animation-delay: 0.5s;
}

.bubble:nth-child(2) {
    left: 50%;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    left: 80%;
    animation-delay: 1.5s;
}

@keyframes rise {
    0% {
        bottom: -10px;
        transform: translateX(0);
    }

    100% {
        bottom: 100px;
        transform: translateX(-5px);
        opacity: 0;
    }
}

/* Secret Game */
.secret-container-bottom {
    width: 100%;
    height: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(to top, transparent, rgba(79, 70, 229, 0.1));
    transition: height 0.05s ease-out;
    position: relative;
}

.ladder {
    width: 50px;
    height: 100%;
    border-left: 4px solid #94a3b8;
    border-right: 4px solid #94a3b8;
    position: relative;
    margin: 0 auto;
}

.dark .ladder {
    border-color: #475569;
}

.rung {
    height: 4px;
    background: #94a3b8;
    width: 100%;
    position: absolute;
    left: 0;
}

.dark .rung {
    background: #475569;
}

.climber {
    font-size: 2rem;
    color: #4f46e5;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    transition: top 0.05s;
    z-index: 10;
}

.dark .climber {
    color: #818cf8;
}
