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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0000 0%, #330000 50%, #000000 100%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

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

header {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
    border: 2px solid #cc0000;
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #ff0000;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    white-space: nowrap;
}

#authSection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#userInfo {
    color: #ff6666;
    font-weight: 500;
}

.auth-note {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

main {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
    border: 2px solid #cc0000;
}

.hidden {
    display: none !important;
}

/* Timer Section */
.timer-section {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid #cc0000;
    margin-bottom: 30px;
}

.timer-section-inline {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #0d0000 0%, #1a0000 100%);
    border-radius: 10px;
    border: 2px solid #cc0000;
    margin-bottom: 25px;
}

.timer-section h3 {
    color: #ff6666;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.timer-display {
    font-size: 4em;
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

.timer-display.workout-timer {
    font-size: 3em;
    color: #ff6600;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.timer-settings {
    margin-top: 20px;
}

.timer-settings label {
    margin-right: 10px;
    font-weight: 500;
}

.timer-settings label {
    color: #ff6666;
}

.timer-settings input {
    width: 80px;
    padding: 8px;
    border: 2px solid #cc0000;
    border-radius: 5px;
    font-size: 1em;
    background: #1a0000;
    color: #fff;
}

.timer-settings input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Exercise Section */
.exercise-section {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
    border: 2px solid #cc0000;
    margin-bottom: 30px;
    overflow: hidden;
}

.exercise-section.collapsed .exercise-content {
    display: none;
}

.exercise-section .collapse-toggle {
    color: #ff0000;
}

.exercise-section .collapse-toggle:hover {
    background: rgba(255, 0, 0, 0.1);
}

.exercise-section:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.exercise-content {
    padding: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff6666;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff0000;
}



.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

#exerciseForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #ff6666;
}

.exercise-select-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.exercise-select-container select {
    flex: 1;
    min-width: 200px;
}

.sort-filter {
    flex: 0 0 auto;
    min-width: 150px;
}

.exercise-description {
    margin-top: 10px;
    padding: 12px;
    background: #0d0000;
    border-left: 3px solid #ff6600;
    border-radius: 5px;
    color: #ff9966;
    font-size: 0.9em;
    line-height: 1.5;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #cc0000;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
    background: #1a0000;
    color: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Strikethrough styling for completed exercises in dropdown */
.form-group select option.completed {
    text-decoration: line-through;
    color: #ff6666 !important;
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    color: white;
    border: 1px solid #ff0000;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    color: white;
    border: 1px solid #ff0000;
}

.btn-success:hover {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ff6600 0%, #cc5200 100%);
    color: white;
    border: 1px solid #ff6600;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff8800 0%, #ff6600 100%);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    color: #ff6666;
    border: 1px solid #666666;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4d4d4d 0%, #333333 100%);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.2);
}

.btn-large {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* Status Section */
.status-section {
    margin-top: 30px;
}

#statusMessage {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

#statusMessage.success {
    background-color: #1a3300;
    color: #66ff66;
    border: 1px solid #339900;
}

#statusMessage.error {
    background-color: #330000;
    color: #ff6666;
    border: 1px solid #cc0000;
}

.today-log {
    background: linear-gradient(135deg, #0d0000 0%, #1a0000 100%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #660000;
    max-height: 300px;
    overflow-y: auto;
    text-align: center;
}

.today-log h3 {
    color: #ff0000;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    text-align: center;
}

.log-entry {
    padding: 10px;
    background: #000000;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #cc0000;
    color: #ff6666;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
        white-space: normal;
    }
    
    .title-break {
        display: inline-block;
    }

    .timer-display {
        font-size: 3em;
    }

    main {
        padding: 20px;
    }

    .timer-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Pomodoro Section */
.pomodoro-section {
    background: linear-gradient(135deg, #001a00 0%, #000000 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    border: 2px solid #00cc00;
    margin-top: 20px;
    overflow: hidden;
}

.pomodoro-section.collapsed .pomodoro-content {
    display: none;
}

.collapse-toggle {
    width: 100%;
    padding: 20px;
    background: transparent;
    border: none;
    color: #00ff00;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.collapse-toggle:hover {
    background: rgba(0, 255, 0, 0.1);
}

.toggle-icon {
    transition: transform 0.3s;
}

.pomodoro-section:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.pomodoro-content {
    padding: 30px;
}

.pomodoro-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.pomodoro-timer {
    font-size: 3em;
    color: #00ff00;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    text-align: center;
}

.pomodoro-status {
    text-align: center;
    color: #66ff66;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.pomodoro-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #00cc00;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #00cc00;
    border-radius: 8px;
    background: #001a00;
    color: #fff;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
}

textarea:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.today-pomodoro {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #00cc00;
    text-align: center;
}

.today-pomodoro h3 {
    color: #00ff00;
    margin-bottom: 15px;
    text-align: center;
}

.today-pomodoro .log-entry {
    background: #001a00;
    border-left-color: #00cc00;
    color: #66ff66;
}

/* Alarm Section */
.alarm-section {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
    border: 2px solid #cc0000;
    margin-top: 20px;
    overflow: hidden;
}

.alarm-section.collapsed .alarm-content {
    display: none;
}

.alarm-section .collapse-toggle {
    color: #ff0000;
}

.alarm-section .collapse-toggle:hover {
    background: rgba(255, 0, 0, 0.1);
}

.alarm-content {
    padding: 30px;
}

.alarm-timer {
    font-size: 3em;
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    text-align: center;
}

.alarm-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.mode-btn {
    padding: 10px 20px;
    border: 2px solid #cc0000;
    background: transparent;
    color: #ff6666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.mode-btn:hover {
    background: rgba(255, 0, 0, 0.1);
}

.mode-btn.active {
    background: #cc0000;
    color: #fff;
}

.alarm-mode {
    margin-bottom: 20px;
}

.time-format-note {
    text-align: center;
    color: #ff6666;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
    opacity: 0.8;
}

.time-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.time-separator {
    font-size: 2em;
    color: #ff0000;
    font-weight: bold;
}

.time-input {
    width: 80px;
    padding: 12px;
    border: 2px solid #cc0000;
    border-radius: 8px;
    background: #1a0000;
    color: #fff;
    font-size: 1.5em;
    text-align: center;
}

.time-input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.alarm-status {
    text-align: center;
    color: #ff6666;
    font-size: 1.1em;
    margin-top: 20px;
    min-height: 30px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3em;
        white-space: normal;
    }

    .timer-display {
        font-size: 2.5em;
    }

    header {
        padding: 20px;
    }

    main {
        padding: 15px;
    }

    .pomodoro-timer {
        font-size: 2.5em;
    }
}
/*
 Alarm Modal */
.alarm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: alarmPulse 1s infinite;
}

@keyframes alarmPulse {
    0%, 100% {
        background: rgba(0, 0, 0, 0.95);
    }
    50% {
        background: rgba(50, 0, 0, 0.95);
    }
}

.alarm-modal-content {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    padding: 50px;
    border-radius: 20px;
    border: 4px solid #ff0000;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.8);
    text-align: center;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.alarm-modal-content h2 {
    color: #ff0000;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

.alarm-modal-content p {
    color: #ff6666;
    font-size: 1.5em;
    margin-bottom: 30px;
}

.alarm-modal-content .btn {
    font-size: 1.3em;
    padding: 20px 40px;
    background: #ff0000;
    color: #fff;
    border: 3px solid #ff6666;
}

.alarm-modal-content .btn:hover {
    background: #ff3333;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
}

/* Instructions Modal */
.instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.instructions-modal-content {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #ff0000;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.5);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.instructions-modal-content h2 {
    color: #ff0000;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

.instructions-list {
    margin-bottom: 30px;
}

.category-header {
    color: #ff6666;
    font-size: 1.5em;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #cc0000;
}

.instruction-item {
    background: #0d0000;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid #ff0000;
}

.instruction-item h4 {
    color: #ff6666;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.instruction-item p {
    color: #ff9999;
    line-height: 1.6;
    margin-bottom: 10px;
}

.default-info {
    display: inline-block;
    background: #330000;
    color: #ff6666;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-right: 10px;
    margin-top: 5px;
}

.instructions-modal-content .btn {
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .instructions-modal-content {
        padding: 20px;
    }
    
    .instructions-modal-content h2 {
        font-size: 1.5em;
    }
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Exercise Picker Modal */
#exercisePickerModal .instructions-modal-content {
    padding: 12px;
    max-width: 450px;
}

#exercisePickerModal h2 {
    margin: 0 0 6px 0;
    font-size: 1.3em;
    text-align: center;
}

#exercisePickerModal h3 {
    margin: 0 0 6px 0;
    font-size: 1.1em;
    color: #ff6666;
    text-align: center;
}

.exercise-picker-categories,
.exercise-picker-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0 0 8px 0;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0;
}

.exercise-category-btn,
.exercise-item-btn {
    text-align: center;
    padding: 10px 12px;
    font-size: 1em;
    width: 100%;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-weight: 500;
}

/* Category buttons - black/red theme */
.exercise-category-btn {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    border: 1px solid #cc0000;
    color: #ff6666;
}

.exercise-category-btn:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    border-color: #ff0000;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

/* Exercise item buttons - also black/red theme */
.exercise-item-btn {
    background: linear-gradient(135deg, #1a0000 0%, #000000 100%);
    border: 1px solid #cc0000;
    color: #ff6666;
}

.exercise-item-btn:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    border-color: #ff0000;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

#backToCategories {
    margin-bottom: 6px;
    padding: 8px 12px;
    font-size: 0.9em;
}

#closeExercisePicker {
    width: 100%;
    padding: 10px;
    margin-top: 3px;
    font-size: 0.95em;
}

/* Custom scrollbar for exercise picker */
.exercise-picker-categories::-webkit-scrollbar,
.exercise-picker-list::-webkit-scrollbar {
    width: 8px;
}

.exercise-picker-categories::-webkit-scrollbar-track,
.exercise-picker-list::-webkit-scrollbar-track {
    background: #1a0000;
    border-radius: 4px;
}

.exercise-picker-categories::-webkit-scrollbar-thumb,
.exercise-picker-list::-webkit-scrollbar-thumb {
    background: #cc0000;
    border-radius: 4px;
}

.exercise-picker-categories::-webkit-scrollbar-thumb:hover,
.exercise-picker-list::-webkit-scrollbar-thumb:hover {
    background: #ff0000;
}
