:root {
    --color-primary: #1eaec3;
    --color-bg: #1c2431;
    --color-text-default: #ffffff;
    --color-highlight: #5a6b7c;
	
	--font-main: 'Roboto', sans-serif;
    --font-condensed: 'Roboto Condensed', sans-serif;
	
	--fade-main: fadeInUp 1s ease-out forwards;
}

@font-face {
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/roboto-condensed-v31-latin-regular.woff2') format('woff2'); 
    font-display: swap;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    font-family: var(--font-condensed);
    color: var(--color-text-default);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.container {
    text-align: center;
    padding: 0 20px;
    max-width: 90%;
    margin-top: 10vh; 
}

.logo {
    width: 220px;
    height: auto;
    display: block;
    margin: 0 auto 40px;
    opacity: 1;
}

h1 {
    font-weight: 400;
    font-size: 2rem;
    margin: 0 0 15px 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: var(--fade-main);
    animation-delay: 0.5s;
}

h1 + p {
    font-weight: 400;
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-highlight);
    letter-spacing: 0.5px;
    opacity: 0;
    animation: var(--fade-main);
    animation-delay: 0.8s;
}

.launch-text {
    margin-top: 40px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-highlight);
    opacity: 0;
    animation: var(--fade-main);
    animation-delay: 2.2s;
}

footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--color-highlight);
    letter-spacing: 1px;
    padding: 1.5rem;
    opacity: 0;
    animation: simpleFade 1s ease-out forwards;
    animation-delay: 3.0s;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes simpleFade {
    from { opacity: 0; }
    to { opacity: 1; }
}





/* --- APP DEMO STYLES (Refined) --- */
.app-preview {
    position: relative;
    margin: 40px auto 0;
    width: 100%;
    max-width: 360px;
    background-color: var(--color-card);
    border-radius: 24px;
    padding: 30px 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.08);
    opacity: 0;
    animation: var(--fade-main);
    animation-delay: 1.5s;
    position: relative;
}

.timer-display {
    font-family: 'Roboto', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 4rem;
    font-weight: 300;
    color: #ffffff;
    text-align: center;
    letter-spacing: -2px;
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}

/* 1. SELECTOR STYLES */
.share-selector-container {
    display: flex;
    align-items: center;
    background-color: var(--color-bg);
    border-radius: 12px;
    padding: 0 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    width: fit-content;
    margin-left: auto; 
    margin-right: auto;
    transition: opacity 0.3s ease;
}

.share-icon {
    color: var(--color-primary);
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.share-dropdown {
    background: transparent;
    border: none;
    color: #d1d5db;
    font-family: var(--font-condensed);
    font-size: 0.9rem;
    padding: 10px 0;
    outline: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.share-dropdown option {
    background-color: var(--color-bg);
    color: white;
}

/* 2. HINT & POPOVER STYLES */
.sharing-hint-wrapper {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.sharing-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    transition: background 0.2s;
}

.sharing-hint:hover {
    background-color: rgba(34, 211, 238, 0.1);
}

.caret { font-size: 0.6rem; opacity: 0.7; }

.share-popover {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--color-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px;
    width: 200px;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-popover.active {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

.popover-header {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
    margin-bottom: 5px;
    text-align: left;
}

.popover-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.popover-list li {
    font-size: 0.85rem;
    color: white;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popover-list li svg { opacity: 0.7; color: var(--color-primary); }
.private-note { color: #9ca3af; font-style: italic; font-size: 0.8rem; }

/* UTILS */
.hidden { display: none !important; }

/* BUTTONS & LAPS (Same as before) */
.controls { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.btn { border: none; outline: none; cursor: pointer; font-family: var(--font-condensed); font-weight: 700; font-size: 1rem; text-transform: uppercase; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; }
.btn:active { transform: scale(0.95); }
.btn-primary { width: 100px; height: 100px; border-radius: 50%; background-color: rgba(34, 211, 238, 0.15); color: var(--color-primary); border: 2px solid var(--color-primary); box-shadow: 0 0 20px rgba(34, 211, 238, 0.2); font-size: 1.2rem; }
.btn-primary:hover { background-color: var(--color-primary); color: #000; }
.btn-stop { width: 100px; height: 100px; border-radius: 50%; background-color: rgba(249, 115, 22, 0.2); color: var(--color-stop); border: 2px solid var(--color-stop); box-shadow: 0 0 20px rgba(249, 115, 22, 0.2); font-size: 1.2rem; }
.btn-stop:hover { background-color: var(--color-stop); color: #fff; }
.btn-secondary { width: 70px; height: 70px; border-radius: 50%; background-color: transparent; color: #9ca3af; border: 2px solid #374151; font-size: 0.8rem; margin-top: 15px; }
.btn-secondary:hover:not(:disabled) { border-color: #d1d5db; color: #fff; }
.btn-secondary:disabled { opacity: 0.3; cursor: default; }

/* Laps List */
.laps-container { max-height: 150px; overflow-y: auto; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; scrollbar-width: thin; scrollbar-color: #374151 transparent; }
.laps-container::-webkit-scrollbar { width: 4px; }
.laps-container::-webkit-scrollbar-thumb { background-color: #374151; border-radius: 4px; }
.lap-row { display: flex; justify-content: space-between; font-family: 'Roboto Mono', monospace; font-size: 0.85rem; padding: 6px 10px; color: #d1d5db; border-bottom: 1px solid rgba(255,255,255,0.05); }
.lap-row.header { font-size: 0.7rem; text-transform: uppercase; color: #6b7280; font-weight: bold; letter-spacing: 1px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 5px; }
.lap-num { color: #6b7280; width: 30px; }
.lap-split { text-align: right; flex: 1; }
.lap-total { text-align: right; flex: 1; color: var(--color-primary); }

@media (max-width: 600px) {
    .app-preview { width: 100%; padding: 20px 10px; }
    .timer-display { font-size: 3.5rem; }
}


@media (max-width: 600px) {
    .container {
        margin-top: 5vh; 
    }

    .logo {
        width: 160px;
        margin-bottom: 30px;
    }

    h1 {
        font-size: 1.6rem;
    }

    p {
        font-size: 1rem;
        padding: 0 10px;
    }
	.app-preview {
		margin: 80px auto 40px;
	}
}




/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 10px;
    transition: all 0.2s;
    z-index: 10;
}
.nav-arrow:hover { color: white; transform: translateY(-50%) scale(1.2); }
.nav-arrow.left { left: -50px; }
.nav-arrow.right { right: -50px; }

@media (max-width: 600px) {
    .nav-arrow.left { left: -10px; background: rgba(0,0,0,0.5); border-radius: 50%; }
    .nav-arrow.right { right: -10px; background: rgba(0,0,0,0.5); border-radius: 50%; }
}

/* Sections */
.view-section { display: none; animation: fadeIn 0.3s ease-out; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

.mode-title {
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: #6b7280;
    text-transform: uppercase;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

#view-alarm .mode-title {
	margin-top: 0;
}

/* Timer Input Style */
.timer-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
}
.time-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 4rem;
    font-family: 'Roboto', monospace;
    width: 90px;
    text-align: center;
    outline: none;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.time-input:focus { border-color: var(--color-primary); }
.time-sep { font-size: 4rem; color: #6b7280; margin: 0 5px; }

/* Shared UI (Reusable) */
.share-component {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
.share-selector {
    display: flex;
    align-items: center;
    background-color: var(--color-bg);
    border-radius: 12px;
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.share-hint {
    color: var(--color-primary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Alarm List Style (Static) */
.alarm-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.alarm-item {
    background-color: var(--color-bg);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.alarm-time { font-size: 1.5rem; color: white; font-weight: 300; }
.alarm-meta { display: flex; flex-direction: column; }
.alarm-label { font-size: 0.7rem; color: var(--color-primary); font-weight: bold; text-transform: uppercase; }
.alarm-days { font-size: 0.65rem; color: #6b7280; }
.toggle { width: 40px; height: 22px; background: #374151; border-radius: 20px; position: relative; cursor:not-allowed;  }
.toggle::after { content:''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; background: white; border-radius: 50%; transition: all 0.2s; }
.toggle.active { background: var(--color-primary); }
.toggle.active::after { left: 20px; }
.btn-add-alarm { width: 100%; padding: 15px; background: #1c2531; border: 1px solid #374151; color: var(--color-primary); cursor:not-allowed; border-radius: 16px; margin-top: 10px; }



/* ... (Previous code) ... */

/* New style for Stopwatch Line */
.timer-display.underlined {
    display: inline-block;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 0px; 
    width: 100%; /* Full width line like inputs */
}

/* --- ALARM LIST STYLES --- */
.alarm-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 2px;
}

.alarm-item {
    background-color: var(--color-bg);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
    overflow: hidden;
}

.alarm-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.alarm-time { font-size: 1.8rem; color: white; font-weight: 300; font-family: 'Roboto', monospace; letter-spacing: -1px; }
.alarm-meta { display: flex; flex-direction: column; align-items: flex-start; flex: 1; margin-left: 15px; }
.alarm-label { font-size: 0.7rem; color: var(--color-primary); font-weight: bold; text-transform: uppercase; }
.alarm-days { font-size: 0.65rem; color: #6b7280; }

/* Toggle Switch */
.toggle { width: 40px; height: 22px; background: #374151; border-radius: 20px; position: relative; cursor: pointer; transition: background 0.2s; cursor: not-allowed;}
.toggle::after { content:''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; background: white; border-radius: 50%; transition: all 0.2s; }
.toggle.active { background: var(--color-primary); }
.toggle.active::after { left: 20px; }

/* Alarm Details (Expanded) */
.alarm-details {
    padding: 0 15px 15px 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: none; /* Hidden by default */
    animation: fadeIn 0.3s;
}
.alarm-item.expanded .alarm-details { display: block; }
.alarm-item.expanded { background-color: #151c27; border-color: rgba(255,255,255,0.1); }

/* Alarm Inputs */
.alarm-input-row { display: flex; gap: 10px; margin-bottom: 10px; margin-top: 10px;}
.alarm-input {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 8px;
    border-radius: 8px;
    font-family: var(--font-condensed);
    width: 100%;
    box-sizing: border-box;
}

/* Weekday Circles */
.day-selector { display: flex; justify-content: space-between; margin-bottom: 15px; }
.day-circle {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    border: 1px solid transparent;
}
.day-circle.selected {
    background: rgba(30, 174, 195, 0.2);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.alarm-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.btn-delete { color: #ef4444; background: none; border: none; font-size: 0.8rem; cursor: pointer; opacity: 0.7; }
.btn-delete:hover { opacity: 1; }

.btn-add-alarm { width: 100%; padding: 15px; background: #1c2531; border: 1px solid #374151; color: var(--color-primary); border-radius: 16px; margin-top: 10px; cursor: pointer; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s; cursor: not-allowed; }
.btn-add-alarm:hover { background: #232e3d; border-color: var(--color-primary); }

/* ... (Rest of existing styles) ... */