* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    padding: 1rem;
    box-sizing: border-box;
}

.swiss-clock {
    width: min(320px, 70vw);
    height: min(320px, 70vw);
    background: #ffffff;
    border-radius: 50%;
    border: 4px solid #d0d0d0;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.swiss-clock:hover {
    transform: scale(1.02);
}

.swiss-clock:active {
    transform: scale(0.98);
}

.clock-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Timer overlay */
.timer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #d52d27;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.timer-overlay.active {
    opacity: 1;
}

/* Clock markers */
.marker {
    position: absolute;
    background: #000000;
    border-radius: 0;
    z-index: 10;
}

.marker-12 {
    width: 6px;
    height: 24px;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
}

.marker-3 {
    width: 24px;
    height: 6px;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
}

.marker-6 {
    width: 6px;
    height: 24px;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
}

.marker-9 {
    width: 24px;
    height: 6px;
    top: 50%;
    left: 25px;
    transform: translateY(-50%);
}

/* Clock hands */
.hand {
    position: absolute;
    background: #000000;
    border-radius: 0;
    transform-origin: bottom center;
    top: 50%;
    left: 50%;
    z-index: 15;
}

.hour-hand {
    width: 6px;
    height: 70px;
    margin-left: -3px;
    margin-top: -70px;
    transform: rotate(0deg);
    transition: transform 0.1s ease-out;
}

.minute-hand {
    width: 4px;
    height: 95px;
    margin-left: -2px;
    margin-top: -95px;
    transform: rotate(0deg);
    transition: transform 0.1s ease-out;
}

.second-hand {
    width: 2px;
    height: 85px;
    margin-left: -1px;
    margin-top: -85px;
    background: #e74c3c;
    transform: rotate(0deg);
    position: relative;
    transition: transform 0.1s ease-out;
}

.second-hand-tip {
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 2px;
    height: 2px;
    background: #e74c3c;
    border-radius: 50%;
}

/* Center dot */
.center-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #000000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
}

/* Timer status */
.timer-status {
    text-align: center;
    color: #333333;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    font-weight: 100;
    letter-spacing: 1.5px;
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
    flex-shrink: 0;
}

.status-text {
    display: block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-transform: uppercase;
}

/* Session stats styling */
.session-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.3rem, 1vh, 0.5rem);
    margin-top: clamp(0.8rem, 2vh, 1.2rem);
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    color: #333333;
    font-weight: 100;
    letter-spacing: 0.8px;
    text-align: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.stat-line {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    line-height: 1.5;
    font-stretch: condensed;
}

/* Goal setting popup styles */
.goal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.goal-popup {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid #e0e0e0;
}

.goal-popup h2 {
    color: #000000;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.goal-popup p {
    color: #666;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.goal-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.goal-input input {
    width: 80px;
    padding: 0.8rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    color: #000000;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.goal-input input:focus {
    outline: none;
    border-color: #000000;
}

.goal-label {
    color: #666;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 300;
}

.goal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.goal-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.goal-btn.primary {
    background: #000000;
    color: #ffffff;
}

.goal-btn.primary:hover {
    background: #333333;
    transform: translateY(-1px);
}

.goal-btn.secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #d0d0d0;
}

.goal-btn.secondary:hover {
    background: #e0e0e0;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
        gap: 1rem;
    }
}

/* iPhone 15 Pro and similar devices */
@media (max-width: 430px) and (max-height: 932px) {
    .container {
        padding: 0.5rem;
        gap: 0.8rem;
    }
    
    .swiss-clock {
        width: min(280px, 65vw);
        height: min(280px, 65vw);
    }
    
    .timer-status {
        margin-top: clamp(1rem, 3vh, 1.5rem);
    }
    
    .session-stats {
        margin-top: clamp(0.6rem, 1.5vh, 0.8rem);
        gap: clamp(0.2rem, 0.8vh, 0.3rem);
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .swiss-clock {
        width: min(250px, 60vw);
        height: min(250px, 60vw);
    }
}