/* ============================================
   DISCIPLINE TRACKER PAGE STYLES
   Matches main site design language
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #142883 0%, #2d0259 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Home Button */
.top-nav {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
}

.top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95em;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    display: inline-block;
}

.top-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd700;
}

@media (max-width: 1024px) {
    .top-nav {
        position: static;
        padding: 12px 0 0 12px;
    }
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 40px 20px;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.page-header .intro-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    opacity: 0.9;
    font-size: 1.05em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Headers */
section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #ffd700;
}

/* Legend Section */
.legend {
    padding: 20px 30px;
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
}

/* Discipline Dots */
.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid;
    transition: all 0.3s ease;
}

.dot.mind {
    border-color: #c4b5fd;
}

.dot.mind.filled {
    background: #c4b5fd;
    box-shadow: 0 0 8px #c4b5fd;
}

.dot.body {
    border-color: #7dd3fc;
}

.dot.body.filled {
    background: #7dd3fc;
    box-shadow: 0 0 8px #7dd3fc;
}

.dot.spirit {
    border-color: #5eead4;
}

.dot.spirit.filled {
    background: #5eead4;
    box-shadow: 0 0 8px #5eead4;
}

/* .dot.spanish {
    border-color: #f472b6;
}

.dot.spanish.filled {
    background: #f472b6;
    box-shadow: 0 0 8px #f472b6;
} */

.dot.exceptional {
    border-color: #ffd700;
}

.dot.exceptional.filled {
    background: #ffd700;
    box-shadow: 0 0 8px #ffd700;
}

/* Calendar + Streak Wrapper */
.calendar-streak-wrapper {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.calendar-streak-wrapper .calendar-section {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.calendar-streak-wrapper .streak-section {
    flex: 0 0 220px;
    margin-bottom: 0;
}

/* Calendar Section */
.calendar-section {
    overflow: visible;
}

/* Streak Section */
.streak-section {
    display: flex;
    flex-direction: column;
}

.streak-section h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.streak-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 15px;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    flex: 1;
}

.streak-card + .streak-card {
    margin-top: 10px;
}

.streak-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.streak-card.streak-perfect {
    border-left-color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
}

.streak-card.streak-mind {
    border-left-color: #c4b5fd;
}

.streak-card.streak-body {
    border-left-color: #7dd3fc;
}

.streak-card.streak-spirit {
    border-left-color: #5eead4;
}

/* .streak-card.streak-spanish {
    border-left-color: #f472b6;
} */

.streak-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.streak-header .dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.streak-icon {
    font-size: 1em;
}

.streak-label {
    font-weight: bold;
    font-size: 0.9em;
}

.streak-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    line-height: 1;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calendar-header h2 {
    margin-bottom: 0;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
}

.nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Navigation button wrapper for tooltips */
.nav-btn-wrapper {
    position: relative;
    display: inline-block;
}

.nav-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
    margin-bottom: 8px;
}

.nav-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.nav-btn-wrapper:hover .nav-tooltip {
    opacity: 0;
    visibility: hidden;
}

.nav-btn-wrapper:has(.nav-btn.disabled):hover .nav-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.day-header {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    color: #ffd700;
    font-size: 0.9em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/* Individual Day Cell */
.day-cell {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.day-cell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.day-cell.other-month {
    opacity: 0.3;
}

.day-cell.today {
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.day-cell.past-day {
    opacity: 0.7;
}

.day-cell.before-tracking,
.day-cell.future-day {
    opacity: 0.3;
}

.day-number {
    font-size: 1em;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.day-dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.day-dots .dot {
    width: 16px;
    height: 16px;
    cursor: default;
    position: relative;
}

.day-dots .dot.filled {
    cursor: pointer;
}

/* Dancing animation for filled dots */
@keyframes dotDance {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(2px);
    }
    100% {
        transform: translateY(0);
    }
}

.dot.filled.dancing {
    animation: dotDance 0.3s ease-out;
}

/* Shame animation for unfilled past dots - horizontal shake */
@keyframes dotShame {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    50% {
        transform: translateX(3px);
    }
    75% {
        transform: translateX(-2px);
    }
    100% {
        transform: translateX(0);
    }
}

.dot.unfilled-past.dancing-shame.mind {
    animation: dotShame 0.4s ease-out;
    box-shadow: 0 0 12px rgba(196, 181, 253, 0.5);
}

.dot.unfilled-past.dancing-shame.body {
    animation: dotShame 0.4s ease-out;
    box-shadow: 0 0 12px rgba(125, 211, 252, 0.5);
}

.dot.unfilled-past.dancing-shame.spirit {
    animation: dotShame 0.4s ease-out;
    box-shadow: 0 0 12px rgba(94, 234, 212, 0.5);
}

/* .dot.unfilled-past.dancing-shame.spanish {
    animation: dotShame 0.4s ease-out;
    box-shadow: 0 0 12px rgba(244, 114, 182, 0.5);
} */

/* Exceptional animation - double bounce with bright glow */
@keyframes dotExceptional {
    0% {
        transform: translateY(0);
    }
    15% {
        transform: translateY(-4px);
    }
    30% {
        transform: translateY(1px);
    }
    45% {
        transform: translateY(0);
    }
    60% {
        transform: translateY(-4px);
    }
    75% {
        transform: translateY(1px);
    }
    100% {
        transform: translateY(0);
    }
}

.dot.exceptional.dancing-exceptional {
    animation: dotExceptional 0.3s ease-out;
    box-shadow: 0 0 20px #ffd700, 0 0 30px rgba(255, 215, 0, 0.6);
}

/* Tooltip */
.dot-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
    margin-bottom: 5px;
}

.dot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.dot.filled:hover .dot-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Text Colors for Categories */
.text-mind {
    color: #c4b5fd;
}

.text-body {
    color: #7dd3fc;
}

.text-spirit {
    color: #5eead4;
}

/* .text-spanish {
    color: #f472b6;
} */

/* Explanation Section */
.explanation p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.explanation p:last-child {
    margin-bottom: 0;
}

/* TODO Section (matches main site) */
.TODO {
    opacity: 0.8;
}

.TODO h5 {
    color: #ffd700;
    margin-bottom: 10px;
}

.TODO ul {
    margin-left: 20px;
}

.TODO li {
    margin-bottom: 5px;
    line-height: 1.6;
}

hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   WEEKLY GOALS SECTION
   ============================================ */

.weekly-goals {
    margin-top: 20px;
}

.weekly-goals h2 {
    margin-bottom: 8px;
}

.goals-week-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    font-style: italic;
}

.goals-loading,
.goals-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 0.95em;
}

.goals-error {
    color: rgba(255, 100, 100, 0.8);
    font-style: italic;
    font-size: 0.95em;
}

.goals-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1em;
}

.goal-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
}

/* The checkbox box */
.goal-checkbox {
    position: relative;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    flex-shrink: 0;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status-specific box border colours */
.goal-status-done        { border-color: #4ade80; }
.goal-status-in-progress { border-color: #60a5fa; }
.goal-status-planned     { border-color: #c084fc; }

/* Blue dot for In Progress */
.goal-status-in-progress::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #60a5fa;
}

/* SVG checkmarks */
.goal-check-svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: #4ade80;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.goal-check-dashed {
    stroke: #c084fc;
    stroke-dasharray: 2 1.5;
}

/* Tooltip */
.goal-dot-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.78em;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}

.goal-dot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.goal-checkbox:hover .goal-dot-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8em;
    }

    .page-header .intro-text {
        font-size: 0.95em;
    }

    .top-nav {
        gap: 10px;
    }

    .top-nav a {
        font-size: 0.85em;
        padding: 6px 12px;
    }

    .calendar-header h2 {
        font-size: 1.3em;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .day-cell {
        padding: 5px;
        min-height: 70px;
    }

    .day-number {
        font-size: 0.85em;
    }

    .day-dots .dot {
        width: 12px;
        height: 12px;
    }

    .day-dots {
        gap: 3px;
    }

    .legend-items {
        gap: 20px;
    }

    .dot {
        width: 16px;
        height: 16px;
    }

    /* Streak section responsive */
    .calendar-streak-wrapper {
        flex-direction: column;
    }

    .calendar-streak-wrapper .streak-section {
        flex: none;
        width: 100%;
    }

    .streak-section {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .streak-section h2 {
        width: 100%;
        margin-bottom: 10px;
    }

    .streak-card {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
        margin-bottom: 0;
    }

    .streak-card.streak-perfect {
        flex-basis: 100%;
    }

    .streak-value {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .day-header {
        font-size: 0.7em;
        padding: 5px;
    }

    .day-cell {
        min-height: 60px;
        padding: 3px;
    }

    .day-number {
        font-size: 0.75em;
        margin-bottom: 4px;
    }

    .day-dots .dot {
        width: 10px;
        height: 10px;
    }
}
