/* Import font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Base colors */
body {
    background-color: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: #1f1f1f;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 1.8rem;
    color: #61dafb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Layout */
.main-layout {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    flex: 1;
}

.clock-section {
    display: flex;
    justify-content: center;
}

.clock-display {
    background-color: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.clock {
    font-size: 2.5rem;
    font-weight: 600;
    color: #ffffff;
}

.game-time {
    font-size: 1.2rem;
    color: #61dafb;
    margin-top: 8px;
}

/* Content section */
.content-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* New layout panels */
.side-panel {
    flex: 0 1 300px;
    min-width: 250px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.center-panel {
    flex: 1 1 400px;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 280px;
}

/* Cards */
.card {
    background-color: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.card h2 {
    font-size: 1.3rem;
    color: #61dafb;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card p {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 0.95rem;
}

/* Clock Selector */
.clock-selector-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.clock-selector {
    position: relative;
    width: min(90vw, 400px);
    height: min(90vw, 400px);
    border-radius: 50%;
    background-color: #2a2a2a;
    border: 2px solid #61dafb;
    box-shadow: 0 0 15px rgba(97, 218, 251, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* Allow markers to extend outside */
}

.clock-center {
    position: absolute;
    width: 14px; /* slightly smaller */
    height: 14px;
    background-color: #61dafb;
    border-radius: 50%;
    z-index: 2;
}

.clock-hand {
    position: absolute;
    width: 2px;
    height: calc(min(90vw, 300px) / 2 - 20px);
    background-color: rgba(97, 218, 251, 0.7);
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.minute-marker {
    position: absolute;
    z-index: 3;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #383846;
    user-select: none;
    z-index: 5;
}

.minute-marker:hover {
    background-color: #4a69bd;
    transform: scale(1.1);
}

.minute-marker.selected {
    background-color: #61dafb;
    color: #121212;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(97, 218, 251, 0.7);
}

.minute-marker.monster-time {
    border: 2px solid #ff5555;
}

/* Buttons */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    background-color: #4a69bd;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

button:hover {
    background-color: #5a89e6;
}

button:disabled {
    background-color: #4b5a65;
    cursor: not-allowed;
}

.small-button {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Offset input */
.offset-control input[type="number"] {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: #e0e0e0;
}

/* Control options */
.control-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    background-color: #2a2a2a;
    padding: 8px 12px;
    border-radius: 8px;
}

.control-option label {
    flex: 1;
    margin-left: 10px;
    font-size: 0.9rem;
}

.control-option input[type="checkbox"] {
    accent-color: #4a69bd;
}

/* Alarm status */
#alarm-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.alarm-buttons {
    display: flex;
    gap: 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .content-section {
        flex-direction: column;
    }
    .clock-display {
        max-width: 100%;
    }
}

#selected-minutes-display {
    color: #ffeb3b; /* bright yellow for visibility */
    font-weight: bold;
}
#auto-stop-time {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: #e0e0e0;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Custom alarm controls */
#custom-alarm-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

#custom-alarm-section h3 {
    font-size: 1rem;
    color: #61dafb;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-alarm-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alarm-selection {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alarm-dropdown {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: #e0e0e0;
}

.alarm-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #4a69bd;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    width: 100%;
}

.upload-label:hover {
    background-color: #5a89e6;
}

.file-input {
    display: none;
}