:root {
  /* 5-Point Mood Scale Colors */
  --mood-1: #4a90a4;       /* Very down - deep blue */
  --mood-2: #6ba3b5;       /* Somewhat down - lighter blue */
  --mood-3: #5ba05b;       /* Neutral - natural green */
  --mood-4: #f6dc5a;       /* Pretty good - warm yellow */
  --mood-5: #f4d03f;       /* Very good - bright yellow */
  --mood-unselected: #e1e5e9; /* Unselected - light gray */
  
  /* Text Colors */
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  
  /* Background */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  
  /* Borders */
  --border-light: #e9ecef;
  --border-focus: rgba(0,0,0,0.2);

  /* Dynamic theme color (changes based on mood) */
  --current-mood-color: var(--mood-unselected);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--current-mood-color) 0%, color-mix(in srgb, var(--current-mood-color) 70%, #000000) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    transition: background 0.5s ease;
    padding-bottom: 90px;
    font-weight: 700;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 90px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 70px;
    gap: 0;
    position: relative;
    z-index: 10;
}

.view-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    border: 4px solid #000000;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 4px 4px 0px #000000;
}

.view-btn:first-child {
    border-radius: 0;
}

.view-btn:last-child {
    border-radius: 0;
    border-left: 4px solid #000000;
}

.view-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000000;
}

.view-btn.active {
    background: #ffffff;
    color: #000000;
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px #000000;
    border-width: 5px;
}

.view-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000000;
}

main {
    background: var(--bg-primary);
    border-radius: 0;
    padding: 30px;
    border: 5px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    backdrop-filter: none;
    min-height: 400px;
    position: relative;
    z-index: 10;
    margin-top: 50px;
}

.view {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

section {
    margin-bottom: 40px;
}

section:last-child {
    margin-bottom: 0;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #000000;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #000000;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mood-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.mood-btn {
    border: 4px solid #000000;
    border-radius: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 6px 6px 0px #000000;
    font-weight: 900;
}

.mood-btn[data-mood="1"] {
    background: var(--mood-1);
}

.mood-btn[data-mood="2"] {
    background: var(--mood-2);
}

.mood-btn[data-mood="3"] {
    background: var(--mood-3);
}

.mood-btn[data-mood="4"] {
    background: var(--mood-4);
}

.mood-btn[data-mood="5"] {
    background: var(--mood-5);
}

.mood-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #000000;
}

.mood-btn.selected {
    border-color: #000000;
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px #000000;
    border-width: 5px;
}

.mood-btn[data-mood="1"].selected::after {
    content: '🌧️';
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8));
}

.mood-btn[data-mood="2"].selected::after {
    content: '☁️';
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8));
}

.mood-btn[data-mood="3"].selected::after {
    content: '⛅';
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8));
}

.mood-btn[data-mood="4"].selected::after {
    content: '🌤️';
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8));
}

.mood-btn[data-mood="5"].selected::after {
    content: '☀️';
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.8));
}

.mood-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0px #000000;
}



/* Neo-Brutalist Chart Container */
.chart-container {
    background: #ffffff;
    border: 4px solid #000000;
    box-shadow: 8px 8px 0px #000000;
    padding: 25px;
    margin: 20px;
    position: relative;
    overflow: hidden;
}

.chart-wrapper {
    position: relative;
    width: 100%;
}

/* Chart Area */
.chart-area {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.chart-grid {
    width: 100%;
    height: 360px; /* Increased height to show x-axis */
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    border: 2px solid #000000;
}

.chart-content {
    position: relative;
    width: 1200px; /* Fixed width for 14 days */
    height: 100%;
    background-image: 
        linear-gradient(to right, #000000 2px, transparent 2px),
        linear-gradient(to bottom, #000000 2px, transparent 2px);
    background-size: 85.7px 60px;
    background-position: 0 0;
    background-repeat: repeat;
}

/* SVG Connection Line */
.connection-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Mood Points */

.mood-point {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #000000;
    border-radius: 50%;
    box-shadow: 3px 3px 0px #000000;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.mood-point:hover {
    transform: translate(-52%, -52%) scale(1.05);
    box-shadow: 5px 5px 0px #000000;
}

/* Today Indicator */
.today-indicator {
    position: absolute;
    top: 0;
    height: 300px;
    width: 4px;
    background: #ff0000;
    z-index: 3;
    display: none;
}

/* X-Axis (Dates) */
.x-axis {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 15px;
    padding: 10px 0 10px 7.5px;
    border-top: 4px solid #000000;
    width: 100%;
    background: #ffffff;
    height: 60px;
}

.date-label {
    width: 70px;
    text-align: center;
    padding: 5px 4px;
    background: #ffffff;
    border: 3px solid #000000;
    box-shadow: 2px 2px 0px #000000;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000000;
    box-sizing: border-box;
}

.date-label.today {
    background: #ff0000;
    color: #ffffff;
}

/* No Entries State */
.no-entries {
    text-align: center;
    color: #000000;
    font-style: normal;
    padding: 40px 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 3px solid #000000;
    box-shadow: 4px 4px 0px #000000;
    background: #f9fafb;
}


.mood-entry-content {
    text-align: center;
}

.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    backdrop-filter: none;
    border-top: 5px solid #000000;
    padding: 15px 20px;
    z-index: 100;
    box-shadow: 0 -4px 0px #000000;
}

.date-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.nav-btn {
    background: var(--current-mood-color);
    color: #000000;
    border: 4px solid #000000;
    width: 45px;
    height: 45px;
    border-radius: 0;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    box-shadow: 4px 4px 0px #000000;
    font-weight: 900;
}

.nav-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000000;
}

.nav-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000000;
}

.nav-date-info {
    text-align: center;
    flex: 1;
    margin: 0 20px;
}

.nav-date-info h2 {
    font-size: 1.1rem;
    font-weight: 900;
    color: #000000;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-date-info p {
    font-size: 0.8rem;
    color: #000000;
    margin: 0;
    font-weight: 700;
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        padding-top: 70px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }

    .view-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        border-width: 3px;
    }

    .view-btn.active {
        border-width: 4px;
    }
    
    .mood-btn {
        width: 50px;
        height: 50px;
        border-width: 3px;
        box-shadow: 4px 4px 0px #000000;
    }

    .mood-btn.selected {
        border-width: 4px;
        box-shadow: 6px 6px 0px #000000;
    }
    
    .mood-btn[data-mood="1"].selected::after,
    .mood-btn[data-mood="2"].selected::after,
    .mood-btn[data-mood="3"].selected::after,
    .mood-btn[data-mood="4"].selected::after,
    .mood-btn[data-mood="5"].selected::after {
        font-size: 1.5rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-width: 3px;
        box-shadow: 3px 3px 0px #000000;
    }

    .nav-date-info {
        margin: 0 10px;
    }

    .nav-date-info h2 {
        font-size: 1rem;
    }

    .nav-date-info p {
        font-size: 0.7rem;
    }

    main {
        border-width: 4px;
        box-shadow: 6px 6px 0px #000000;
        margin-top: 30px;
    }
    
    .view-navigation {
        margin-bottom: 50px;
    }

    .chart-container {
        margin: 10px;
        padding: 15px;
        border-width: 3px;
        box-shadow: 5px 5px 0px #000000;
    }
    
    
    .chart-grid {
        height: 300px; /* Increased for mobile */
        border-width: 1px;
    }
    
    .chart-content {
        width: 980px; /* 14 days * 70px */
        height: 100%;
        background-size: 70px 50px;
    }
    
    .x-axis {
        bottom: 0;
        gap: 10px;
        padding: 8px 0 8px 5px;
        border-top-width: 3px;
        height: 50px;
    }
    
    .mood-point {
        width: 32px;
        height: 32px;
        border-width: 2px;
        box-shadow: 2px 2px 0px #000000;
        font-size: 16px;
    }
    
    .mood-point:hover {
        box-shadow: 3px 3px 0px #000000;
    }
    
    .today-indicator {
        width: 3px;
        height: 250px;
    }
    
    .date-label {
        width: 60px;
        padding: 4px 3px;
        border-width: 2px;
        box-shadow: 1px 1px 0px #000000;
        font-size: 0.6rem;
    }

    .bottom-navigation {
        padding: 12px 15px;
        border-top-width: 4px;
        box-shadow: 0 -3px 0px #000000;
    }
}

/* Save Indicator */
.save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border: 4px solid #000000;
    background: #ffffff;
    box-shadow: 4px 4px 0px #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.2s ease;
}

.save-indicator.hidden {
    opacity: 0;
    transform: translate(10px, -10px);
    pointer-events: none;
}

.save-indicator.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.floppy-icon {
  position: relative;
  width: 28px;
  height: 28px;
  background: #000000;
  cursor: pointer;
  transition: all 0.1s ease;
  clip-path: polygon(0% 0%, 70% 0%, 100% 30%, 100% 100%, 0% 100%);
}

.floppy-icon:hover {
  transform: scale(1.05);
}

.top-label {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 8px;
  height: 6px;
  background: #ffffff;
}

.write-protect-tab {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 6px;
  background: #000000;
}

.main-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  height: 12px;
  background: #ffffff;
}

@media (max-width: 480px) {
    .save-indicator {
        width: 40px;
        height: 40px;
        border-width: 3px;
        box-shadow: 3px 3px 0px #000000;
        top: 15px;
        right: 15px;
    }
    
    .floppy-icon {
        width: 22px;
        height: 22px;
    }
    
    .top-label {
        top: 3px;
        left: 3px;
        right: 6px;
        height: 4px;
    }
    
    .write-protect-tab {
        width: 2px;
        height: 4px;
    }
    
    .main-label {
        bottom: 3px;
        left: 3px;
        right: 3px;
        height: 8px;
    }
}

/* Large Weather Background Icon */
.weather-bg-icon {
    position: fixed;
    top: 80px;
    left: 20px;
    font-size: 12rem;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    transition: all 0.5s ease;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.1));
    user-select: none;
}

@media (max-width: 480px) {
    .weather-bg-icon {
        font-size: 8rem;
        top: 60px;
        left: 15px;
        opacity: 1;
    }
}

/* Thoughts Section */
.thoughts-section {
    margin-top: 30px;
    text-align: left;
}

.thoughts-label {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.thoughts-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 4px solid #000000;
    border-radius: 0;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    resize: vertical;
    box-shadow: 4px 4px 0px #000000;
    transition: all 0.2s ease;
    outline: none;
}

.thoughts-input:focus {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000000;
    border-width: 5px;
    min-height: 240px;
}

.thoughts-input::placeholder {
    color: #666666;
    font-style: italic;
    font-weight: 400;
}

@media (max-width: 480px) {
    .thoughts-section {
        margin-top: 25px;
    }
    
    .thoughts-input {
        min-height: 100px;
        padding: 12px;
        border-width: 3px;
        box-shadow: 3px 3px 0px #000000;
        font-size: 0.9rem;
    }
    
    .thoughts-input:focus {
        box-shadow: 5px 5px 0px #000000;
        border-width: 4px;
        min-height: 200px;
    }
}

/* Tags Section */
.tags-section {
    margin-top: 25px;
    text-align: left;
}

.tags-label {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.tags-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.core-tags, .mood-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-btn {
    background: #ffffff;
    color: #000000;
    border: 3px solid #000000;
    border-radius: 0;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px #000000;
    user-select: none;
}

.tag-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #000000;
}

.tag-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px #000000;
}

.tag-btn.selected {
    background: #000000;
    color: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #000000;
    border-width: 4px;
}

@media (max-width: 480px) {
    .tags-section {
        margin-top: 20px;
    }
    
    .tag-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-width: 2px;
        box-shadow: 2px 2px 0px #000000;
    }
    
    .tag-btn:hover {
        box-shadow: 3px 3px 0px #000000;
    }
    
    .tag-btn.selected {
        border-width: 3px;
        box-shadow: 4px 4px 0px #000000;
    }
}