/* Font face declaration */
@font-face {
    font-family: 'Moneygraphy';
    src: url('../fonts/Moneygraphy-Pixel.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Base styles */
:root {
    --gumroad-radius: 12px;
    --gumroad-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --custom-button-color: #1D2332;
}

body {
    line-height: 1.7;
    font-family: 'Moneygraphy', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #FFFFFF;
    background-color: #000000;
}

/* Apply font to all headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Moneygraphy', sans-serif;
}

/* Apply font to buttons */
.btn {
    font-family: 'Moneygraphy', sans-serif;
}

/* Apply font to form elements */
input, textarea, select, .form-control {
    font-family: 'Moneygraphy', sans-serif;
}

/* Card and container styles */
.container {
    max-width: 800px;
    padding: 2rem 1rem;
}

.card {
    border-radius: var(--gumroad-radius);
    border: 1px solid var(--custom-button-color);
    box-shadow: var(--gumroad-shadow);
    background: #000000;
}

.card-body {
    padding: 2rem;
}

/* Form elements */
.form-control {
    border-radius: var(--gumroad-radius);
    padding: 0.75rem 1rem;
    background: #000000;
    border: 2px solid var(--custom-button-color);
    color: #FFFFFF;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--bs-info);
    box-shadow: 0 0 0 3px rgba(13, 202, 240, 0.2);
    background: #000000;
    color: #FFFFFF;
}

/* Buttons */
.btn {
    border-radius: var(--gumroad-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: var(--custom-button-color);
    border-color: var(--custom-button-color);
    color: #FFFFFF;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--gumroad-shadow);
    background-color: #2a3447;
    border-color: #2a3447;
    color: #FFFFFF;
}

.btn-lg {
    padding: 1rem 2rem;
}

.btn-group .btn {
    border-radius: var(--gumroad-radius) !important;
    margin: 0 0.25rem;
}

/* Timer container and SVG styles */
.timer-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    overflow: visible;
}

.timer-circle {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Timer background and progress styles */
.timer-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.timer-progress {
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
    stroke: var(--bs-success);
}

/* Timer text styles */
.timer-text {
    font-family: 'Moneygraphy', sans-serif;
    font-weight: 600;
    fill: #FFFFFF;
    dominant-baseline: middle;
    text-anchor: middle;
}

/* Dynamic text sizing based on content length */
.timer-text[data-length="short"] {
    font-size: 40px;
}

.timer-text[data-length="medium"] {
    font-size: 32px;
}

.timer-text[data-length="long"] {
    font-size: 24px;
}

/* Responsive adjustments for timer text */
@media (max-width: 576px) {
    .timer-container {
        width: 160px;
        height: 160px;
    }

    .timer-text[data-length="short"] {
        font-size: 32px;
    }

    .timer-text[data-length="medium"] {
        font-size: 24px;
    }

    .timer-text[data-length="long"] {
        font-size: 20px;
    }
}

/* Break timer specific styles */
#breakDisplay .timer-container {
    width: 200px;
    height: 200px;
}

#breakDisplay .alert {
    background: #000000;
    border: 2px solid var(--bs-info);
    color: #FFFFFF;
}

/* Task lists */
.list-group-item {
    background: #000000;
    border: 1px solid var(--custom-button-color);
    margin-bottom: 0.5rem;
    border-radius: var(--gumroad-radius);
    padding: 1rem;
    transition: all 0.2s ease;
    color: #FFFFFF;
}

.list-group-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--gumroad-shadow);
}

/* Archived tasks */
.archived-tasks {
    opacity: 0.7;
}

.archived-task {
    padding: 1rem;
    background: #000000;
    border: 1px solid var(--custom-button-color);
    border-radius: var(--gumroad-radius);
    transition: all 0.2s ease;
    color: #FFFFFF;
}

.archived-task h6 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.archived-task small {
    font-size: 0.75rem;
}

/* Section headings */
h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

/* Drag and drop */
.sortable-ghost {
    opacity: 0.5;
    background: #000000;
    border: 2px dashed var(--bs-info);
}

.sortable-chosen {
    background: #000000;
}

.drag-handle {
    color: var(--bs-secondary);
    cursor: grab;
    padding: 0.5rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }

    .container {
        padding: 1rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        margin: 0.25rem 0;
    }
}

/* Modal styling */
.modal-content {
    border-radius: var(--gumroad-radius);
    border: none;
    background: #000000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--custom-button-color);
}

.modal-header {
    border-bottom: 1px solid var(--custom-button-color);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--custom-button-color);
    padding: 1.5rem;
}

/* Additional custom styles for better ADHD-friendly UI */
body {
    line-height: 1.6;
}

.form-control {
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(130, 138, 145, 0.5);
    border-color: var(--bs-secondary);
}

.card {
    border-radius: 1rem;
}

.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.alert {
    border-radius: 0.75rem;
    background: #000000;
    border: 2px solid var(--custom-button-color);
    color: #FFFFFF;
}

/* Increase spacing for better readability */
.form-label {
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #FFFFFF;
}

/* Make datetime picker more visible */
input[type="datetime-local"] {
    padding: 0.75rem;
    background: #000000;
    border: 2px solid var(--custom-button-color);
    color: #FFFFFF;
}

/* Smooth transitions for feedback messages */
#feedback {
    transition: opacity 0.3s ease;
}

/* Ensure consistent spacing in task display */
#taskDisplay {
    transition: all 0.3s ease;
}

/* Enhanced focus states for accessibility */
:focus {
    outline: none;
}


/* Reminder pop-up styles */
.reminder-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000000;
    border: 2px solid var(--bs-warning);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
    max-width: 90%;
    width: 400px;
    color: #FFFFFF;
}

.reminder-popup h4 {
    color: var(--bs-warning);
    margin-bottom: 1rem;
}

.reminder-popup p {
    margin-bottom: 0.5rem;
}

.reminder-popup .encouragement {
    color: var(--bs-info);
    font-weight: 500;
    margin-top: 0.5rem;
}

.character-container {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Character customization styles */
.character-preview {
    background: #000000;
    padding: 2rem;
    border-radius: 1rem;
    margin: -1rem -1rem 1rem -1rem;
    color: #FFFFFF;
}

.form-control-color {
    height: 3rem;
}

/* Character animations and styles */
.character-svg {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Basic bounce animation */
.body-bounce {
    animation: subtle-bounce 2s ease-in-out infinite;
    transform-origin: center center;
}

/* Wing flutter animation for owl */
.wing-flutter {
    animation: wing-flutter 2s ease-in-out infinite;
    transform-origin: center;
}

/* Ear wiggle animation for rabbit */
.ears {
    animation: ear-wiggle 3s ease-in-out infinite;
    transform-origin: bottom center;
}

/* Whiskers movement for cat */
.whiskers {
    animation: whisker-twitch 4s ease-in-out infinite;
}

/* Animation keyframes */
@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes wing-flutter {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.95); }
}

@keyframes ear-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes whisker-twitch {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

/* Character container styles */
.character-container {
    width: 60px;
    height: 60px;
    display: inline-block;
    margin: 0 auto; /* Centered the container */
    position: relative;
}

/* Character states */
.character-svg.happy .mouth {
    transform: scale(1.1);
}

.character-svg.focused .eye {
    transform: scale(0.9);
    animation: focused-blink 4s ease-in-out infinite;
}

.character-svg.encouraging .body-bounce {
    animation-duration: 1.5s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation speed variations */
.speed-slow .body-bounce {
    animation-duration: 3s !important;
}

.speed-normal .body-bounce {
    animation-duration: 2s !important;
}

.speed-fast .body-bounce {
    animation-duration: 1s !important;
}

/* Mood-based animations */
.character-svg.focused .body-bounce {
    animation: subtle-bounce 2s ease-in-out infinite;
}

.character-svg.happy .body-bounce {
    animation: happy-bounce 1s ease-in-out infinite;
}

.character-svg.encouraging .body-bounce {
    animation: encouraging-bounce 1.5s ease-in-out infinite;
}

.character-svg.worried .body-bounce {
    animation: worried-shake 1s ease-in-out infinite;
}

.sparkle {
    animation: sparkle-fade 2s ease-in-out infinite;
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--bs-warning);
    border-radius: 50%;
}

/* Animation keyframes */
@keyframes subtle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes happy-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

@keyframes encouraging-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(-2deg);
    }
    75% {
        transform: translateY(-3px) rotate(2deg);
    }
}

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

@keyframes sparkle-fade {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Character style transitions */
.body-bounce {
    transition: d 0.3s ease, fill 0.3s ease;
}

/* Modal enhancements */
.modal-content {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--custom-button-color);
}

.modal-footer {
    border-top: 1px solid var(--custom-button-color);
}

/* Character-specific animations */
/* Cat animations */
[data-character-type="cat"] .body-bounce {
    animation: cat-bounce 2s ease-in-out infinite;
}

[data-character-type="cat"].happy .body-bounce {
    animation: cat-happy-bounce 1.5s ease-in-out infinite;
}

/* Rabbit animations */
[data-character-type="rabbit"] .body-bounce {
    animation: rabbit-hop 1.5s ease-in-out infinite;
}

[data-character-type="rabbit"] .tail-wiggle {
    animation: tail-wiggle 1s ease-in-out infinite;
}

/* Owl animations */
[data-character-type="owl"] .body-bounce {
    animation: owl-float 3s ease-in-out infinite;
}

[data-character-type="owl"] .wing-flutter {
    animation: wing-flutter 2s ease-in-out infinite;
}

/* Animal-specific keyframes */
@keyframes cat-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}

@keyframes cat-happy-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

@keyframes rabbit-hop {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes tail-wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(15deg);
    }
    75% {
        transform: rotate(-15deg);
    }
}

@keyframes owl-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes wing-flutter {
    0%, 100% {
        transform: scaleX(1);
    }
    50% {
        transform: scaleX(0.9);
    }
}

/* Animation speed variations for each animal */
.speed-slow[data-character-type="cat"] .body-bounce {
    animation-duration: 3s !important;
}

.speed-fast[data-character-type="rabbit"] .body-bounce {
    animation-duration: 1s !important;
}

.speed-normal[data-character-type="owl"] .body-bounce {
    animation-duration: 2.5s !important;
}

/* Motivational Quote Styles */
.quote-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 300px;
    background: #000000;
    border: 2px solid var(--bs-info);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    color: #FFFFFF;
}

.quote-container.show {
    opacity: 1;
    transform: translateY(0);
}

.quote-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quote-character {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.quote-text {
    color: #FFFFFF;
    font-size: 1rem;
    line-height: 1.5;
}

/* Next Tasks drag and drop styles */
.sortable-ghost {
    opacity: 0.5;
    background: #000000;
}

.sortable-chosen {
    background: #000000;
}

.sortable-drag {
    opacity: 0.9;
    background: #000000;
    border: 2px dashed var(--bs-info);
}

.drag-handle {
    color: var(--bs-secondary);
    cursor: grab;
    padding: 0.25rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Enhance list group items */
.list-group-item {
    transition: all 0.2s ease;
    border: 1px solid var(--custom-button-color);
    color: #FFFFFF;
}

.list-group-item:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: var(--gumroad-shadow);
}

/* Button group styles */
.btn-group .btn {
    padding: 0.25rem 0.5rem;
}

.btn-group .btn i {
    width: 16px;
    height: 16px;
}

/* Archived Tasks styles */
.archived-tasks {
    opacity: 0.8;
}

.archived-task {
    padding: 0.5rem 1rem;
    background: #000000;
    border: 1px solid var(--custom-button-color);
    transition: all 0.2s ease;
    color: #FFFFFF;
}

.archived-task:hover {
    opacity: 1;
}

.archived-task h6 {
    color: var(--bs-secondary);
    font-size: 0.9rem;
}

.archived-task .task-info {
    flex-grow: 1;
}

.archived-task small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.archived-task .note {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Break timer enhancements */
#breakDisplay .timer-container {
    width: 150px;
    height: 150px;
}

#breakDisplay .alert {
    background: #000000;
    border: 2px solid var(--bs-info);
    color: #FFFFFF;
}

/* Enhanced hover and focus states */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(13, 202, 240, 0.2);
}

/* Typography refinements */
h1,
h3 {
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #FFFFFF;
}

/* Additional responsive adjustments */
@media (max-width: 576px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .quote-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}

@keyframes focused-blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

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

@media (max-width: 576px) {
    .character-container {
        width: 50px;
        height: 50px;
    }
}

/* Button specific styles */
.btn-task-action {
    background-color: #EB4909;
    border-color: #EB4909;
    color: #FFFFFF;
}

.btn-task-action:hover,
.btn-task-action:active,
.btn-task-action:focus {
    background-color: #d94207;
    border-color: #d94207;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: var(--gumroad-shadow);
}

/* Add Task button */
#taskForm .btn-info {
    background-color: #EB4909;
    border-color: #EB4909;
    color: #FFFFFF;
}

#taskForm .btn-info:hover,
#taskForm .btn-info:active,
#taskForm .btn-info:focus {
    background-color: #d94207;
    border-color: #d94207;
    color: #FFFFFF;
}

/* Add to List button */
#addNextTask {
    background-color: #EB4909;
    border-color: #EB4909;
    color: #FFFFFF;
}

#addNextTask:hover,
#addNextTask:active,
#addNextTask:focus {
    background-color: #d94207;
    border-color: #d94207;
    color: #FFFFFF;
}

/* Task action buttons */
#completeTask,
#extendTask,
#takeBreak {
    background-color: #EB4909;
    border-color: #EB4909;
    color: #FFFFFF;
}

#completeTask:hover,
#completeTask:active,
#completeTask:focus,
#extendTask:hover,
#extendTask:active,
#extendTask:focus,
#takeBreak:hover,
#takeBreak:active,
#takeBreak:focus {
    background-color: #d94207;
    border-color: #d94207;
    color: #FFFFFF;
}

/* Override any bootstrap classes */
.btn-success,
.btn-warning,
.btn-info {
    background-color: #EB4909 !important;
    border-color: #EB4909 !important;
    color: #FFFFFF !important;
}

.btn-success:hover,
.btn-warning:hover,
.btn-info:hover {
    background-color: #d94207 !important;
    border-color: #d94207 !important;
    color: #FFFFFF !important;
}