/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Three.js Road Background Canvas */
#roadCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Main container */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Timer card */
.timer-card {
    position: fixed; /* or absolute if parent has relative */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    width: 100%;
    max-width: 400px; /* optional */
    box-sizing: border-box;
}


/* Header styles */
.header {
    margin-bottom: 32px;
}

.header h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.session-type {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Circular timer container */
.timer-circle-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

/* SVG timer circle */
.timer-circle {
    transform: rotate(-90deg);
}

.circle-bg {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 8;
    fill: transparent;
}

.circle-progress {
    stroke: #ef4444;
    stroke-width: 8;
    fill: transparent;
    stroke-dasharray: 754; /* 2 * π * 120 */
    stroke-dashoffset: 754;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.circle-progress.break-mode {
    stroke: #10b981;
}

/* Timer display in center */
.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.time-text {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.time-remaining {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Control buttons */
.controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: rgba(16, 185, 129, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: rgba(5, 150, 105, 0.9);
}

.btn-primary.running {
    background: rgba(239, 68, 68, 0.8);
}

.btn-primary.running:hover {
    background: rgba(220, 38, 38, 0.9);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-icon {
    font-size: 1.125rem;
}

/* Session info */
.session-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Webcam positioning */
iframe[src="webcam.html"] {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Spotify */
.spotify-corner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .timer-card {
        padding: 24px;
    }
    
    .time-text {
        font-size: 2.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .spotify-corner {
        width: 280px;
        height: auto;
    }
    
    .spotify-corner iframe {
        width: 100%;
        height: 152px;
    }
    
    iframe[src="webcam.html"] {
        width: 150px;
        height: 150px;
    }
}

/* Animation for session transition */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.session-transition {
    animation: pulse 0.6s ease-in-out;
}

#loginBtn {
  display: block !important;
  position: relative !important;
  z-index: 9999 !important;
  background-color: #4285f4;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin: 20px;
}
