/* Mobile-first Tabata Timer Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary-color: #00CED1;
    --rest-color: #90EE90;
    --round-color: #FF8C00;
    --button-primary: #00CED1;
    --button-secondary: #666666;
    --button-danger: #FF4444;
    --input-bg: #1a1a1a;
    --input-border: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* Settings Panel */
.settings-panel {
    width: 100%;
    padding: 2rem 1.5rem;
}

.settings-panel h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.input-with-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-buttons input {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.btn-minus,
.btn-plus {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 1rem;
    background-color: var(--button-secondary);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    touch-action: manipulation;
}

.btn-minus:active,
.btn-plus:active {
    transform: scale(0.95);
    background-color: var(--primary-color);
}

.btn-minus:hover,
.btn-plus:hover {
    background-color: var(--button-primary);
    color: var(--bg-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    transition: opacity 0.2s, transform 0.1s;
    touch-action: manipulation;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--button-primary);
    color: var(--bg-color);
    width: 100%;
}

.btn-secondary {
    background-color: var(--button-secondary);
    color: var(--text-color);
}

.btn-danger {
    background-color: var(--button-danger);
    color: var(--text-color);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Timer Display */
.timer-display {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-display.hidden {
    display: none;
}

.settings-panel.hidden {
    display: none;
}

/* Circular Progress Container */
.timer-circle-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    margin: 0 auto 4rem;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
    position: absolute;
    top: 0;
    left: 0;
}

.timer-svg-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.circle-bg {
    stroke: #1a1a1a;
}

.circle-progress {
    transition: stroke-dashoffset 0.1s linear;
    stroke-dasharray: 1130.97; /* 2 * PI * 180 for outer circle */
    stroke-dashoffset: 1130.97;
}

.outer-circle-progress {
    stroke: var(--primary-color);
    stroke-dasharray: 1130.97; /* 2 * PI * 180 */
}

.inner-circle-progress {
    stroke-dasharray: 879.65; /* 2 * PI * 140 */
    stroke-dashoffset: 879.65;
}

/* Inner circle solid colors */
.inner-circle-progress.round-time {
    stroke: var(--round-color);
}

.inner-circle-progress.rest-time {
    stroke: var(--rest-color);
}

.inner-circle-progress.hidden {
    display: none;
}

/* Gradient definition */
.timer-svg defs {
    display: block;
}

/* Center Content */
.timer-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.countdown-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

/* Timer Info - Positioned around the circle */
.timer-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.info-item {
    position: absolute;
    text-align: left;
}

.info-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.info-subtext {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.5rem;
    white-space: nowrap;
}

.info-top-left {
    top: -15%;
    left: 0;
}

.info-top-right {
    top: -15%;
    right: 0;
    text-align: right;
}

.info-bottom-left {
    bottom: -20%;
    left: 0;
}

.info-bottom-right {
    bottom: -20%;
    right: 0;
    text-align: right;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 350px;
    justify-content: center;
    margin-top: 2rem;
}

.timer-controls .btn {
    flex: 1;
    max-width: 120px;
}

.timer-controls .btn.hidden {
    display: none;
}

#pause-resume-btn {
    min-width: 120px;
}

/* Responsive Design - Tablet and Desktop */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }

    .settings-panel {
        padding: 3rem 2rem;
    }

    .settings-panel h1 {
        font-size: 2.5rem;
    }

    .timer-circle-container {
        max-width: 450px;
    }

    .countdown-number {
        font-size: 5rem;
    }

    .info-value {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 700px;
    }

    .timer-circle-container {
        max-width: 500px;
    }

    .countdown-number {
        font-size: 6rem;
    }
}

/* Prevent zoom on input focus (iOS) */
input[type="number"],
input[type="text"],
select {
    font-size: 16px;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom Notification Modal */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.notification-modal.hidden {
    display: none;
}

.notification-content {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.notification-message {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.5;
}

.notification-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.notification-btn {
    min-width: 100px;
}

