:root {
    --bg-color: #fff0f5; 
    --text-color: #5c4b51; 
    --accent-color: #ffb6c1; 
}

body {
    margin: 0;
    height: 100vh;
    background-color: var(--bg-color);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--text-color);
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bg-square {
    position: absolute;
    width: min(80vw, 80vh);
    height: min(80vw, 80vh);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    opacity: 0.9;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.timer-display {
    position: relative;
    z-index: 2;
    font-family: 'Courier New', Courier, monospace;
    font-size: min(12vw, 5rem);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    transform: translateY(-100%);
}

.ui-wrapper {
    position: absolute;
    bottom: 3rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.glass-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.65);
    padding: 10px 15px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    padding: 4px;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-btn {
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-color);
    transition: 0.3s ease;
    user-select: none;
}

.toggle-group input[type="radio"]:checked + .toggle-btn {
    background: white;
    color: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.divider {
    width: 2px;
    height: 30px;
    background: rgba(255, 182, 193, 0.5);
    border-radius: 2px;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s ease;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hint {
    font-size: 0.65rem;
    font-weight: bold;
    opacity: 0.5;
    user-select: none;
}

input[type="number"] {
    width: 45px;
    padding: 10px 5px;
    border: none;
    border-radius: 12px;
    background: white;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    outline: none;
    font-family: monospace;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

input[type="number"]:disabled {
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

.colon {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    cursor: pointer;
    background: var(--accent-color);
    color: white;
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.icon-btn:hover {
    filter: brightness(0.95);
    transform: scale(1.05);
}

.video-overlay {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.video-overlay.active {
    display: flex;
}

.video-card {
    position: relative;
    width: min(85vw, 85vh);
    height: min(85vw, 85vh);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    outline: none;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    border: none;
    cursor: pointer;
}

.close-btn:hover {
    background: var(--accent-color);
    color: white;
}