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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f7;
    padding: 20px;
    color: #1d1d1f;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.server-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.status-section {
    padding: 40px 30px;
    text-align: center;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e7;
}

.status-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
}

.active-booking {
    padding: 30px;
    text-align: center;
    background: #f0f0f2;
}

.booking-owner {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.booking-notes {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.countdown {
    margin: 30px 0;
}

.time-display {
    font-size: 4rem;
    font-weight: 700;
    color: #0071e3;
    font-variant-numeric: tabular-nums;
}

.time-subtitle {
    color: #666;
    margin-top: 10px;
    font-size: 0.95rem;
}

.extend-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.extend-buttons button {
    flex: 1 1 calc(50% - 5px);
    min-width: 100px;
    padding: 12px;
    background: white;
    border: 2px solid #d2d2d7;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.extend-buttons button:hover {
    background: #f5f5f7;
    border-color: #0071e3;
}

.release-btn {
    width: 100%;
    padding: 14px;
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.release-btn:hover {
    background: #e02d21;
}

.booking-form {
    padding: 30px;
}

.booking-form h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.booking-form input {
    width: 100%;
    padding: 14px;
    border: 2px solid #d2d2d7;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

.booking-form input:focus {
    outline: none;
    border-color: #0071e3;
}

.duration-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.duration-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 100px;
    padding: 14px;
    background: white;
    border: 2px solid #d2d2d7;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-btn:hover {
    background: #f5f5f7;
}

.duration-btn.selected {
    background: #0071e3;
    color: white;
    border-color: #0071e3;
}

.book-btn {
    width: 100%;
    padding: 16px;
    background: #a0a0a5;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: background 0.2s;
}

.book-btn:not(:disabled) {
    background: #0071e3;
    cursor: pointer;
}

.book-btn:not(:disabled):hover {
    background: #0059b3;
}

.section {
    border-top: 1px solid #e5e5e7;
}

.section-header {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.toggle-icon {
    color: #86868b;
    font-size: 0.9rem;
}

.section-content {
    padding: 0 30px 20px;
}

.empty-message {
    text-align: center;
    color: #86868b;
    padding: 20px;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 8px;
}

.queue-item.urgent {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.queue-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-position {
    font-weight: 600;
    color: #666;
}

.queue-name {
    font-weight: 500;
}

.queue-duration {
    color: #666;
    font-size: 0.9rem;
    margin-left: 5px;
}

.urgent-badge {
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.remove-btn {
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-form {
    margin-top: 15px;
}

.queue-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.queue-duration-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.queue-duration-btn {
    flex: 1 1 calc(25% - 6px);
    min-width: 60px;
    padding: 10px;
    background: white;
    border: 2px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.queue-duration-btn:hover {
    background: #f5f5f7;
}

.queue-duration-btn.selected {
    background: #ff9500;
    color: white;
    border-color: #ff9500;
}

.queue-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.urgent-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.urgent-checkbox input {
    width: auto;
    margin: 0;
}

.join-queue-btn {
    padding: 10px 24px;
    background: #ff9500;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.join-queue-btn:hover {
    background: #e68600;
}

.history-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 8px;
}

.history-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.history-time {
    color: #666;
    font-size: 0.9rem;
}

.history-notes {
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
}

.auto-refresh {
    padding: 15px;
    text-align: center;
    color: #86868b;
    font-size: 0.85rem;
    border-top: 1px solid #e5e5e7;
}

.notification-test {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e5e5e7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.test-notification-btn {
    padding: 10px 20px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.test-notification-btn:hover {
    background: #0059b3;
}

#notificationStatus {
    font-size: 0.9rem;
    font-weight: 600;
}
