/* RStudio-inspired Dashboard Styles */

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: #1e1e1e;
    color: #d4d4d4;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
}

/* Mobile Warning Styles */
.mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.mobile-warning-content {
    background: #2d2d30;
    border: 2px solid #007acc;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-warning-content i {
    font-size: 48px;
    color: #007acc;
    margin-bottom: 20px;
}

.mobile-warning-content h3 {
    color: #ffffff;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.mobile-warning-content p {
    color: #d4d4d4;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 25px 0;
}


/* Hide mobile warning on desktop */
@media (min-width: 768px) {
    .mobile-warning {
        display: none !important;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #2d2d30;
    z-index: 1000;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3e3e42;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #d4d4d4;
}

.nav-logo i {
    margin-right: 8px;
    color: #e74c3c;
    font-size: 1.4rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #d4d4d4;
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: #3e3e42;
}

/* Ensure toolbar container doesn't compress */
.rstudio-container {
    margin-top: 60px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    overflow: hidden;
    min-width: 600px; /* Reasonable minimum */
    width: 100%;
    min-height: 0; /* Allow flex children to shrink */
}

/* Menu Bar - Balanced approach */
.menu-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    padding: 0 10px;
    height: 30px;
    flex-shrink: 0;
    min-width: 600px; /* Reasonable minimum */
}

.menu-left {
    display: flex;
    gap: 15px;
}

.menu-item {
    color: #cccccc;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 2px;
}

.menu-item:hover {
    background: #3e3e42;
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.window-title {
    color: #cccccc;
    font-size: 12px;
}

.window-controls {
    display: flex;
    gap: 5px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control-btn.close {
    background: #ff5f56;
}

.control-btn.minimize {
    background: #ffbd2e;
}

.control-btn.maximize {
    background: #27ca3f;
}

/* Toolbar - Prevent shrinking and wrapping */
.toolbar {
    display: flex;
    align-items: center;
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    padding: 8px 10px;
    gap: 8px;
    height: 40px;
    flex-shrink: 0;
    min-width: 600px; /* Reasonable minimum */
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Allow horizontal scroll if needed */
    width: 100%; /* Take full width */
}

.tool-btn {
    background: transparent;
    border: none;
    color: #cccccc;
    padding: 6px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
    white-space: nowrap; /* Prevent text wrapping */
}

.tool-btn:hover {
    background: #3e3e42;
}

.tool-separator {
    width: 1px;
    height: 20px;
    background: #3e3e42;
    margin: 0 5px;
}

.search-input {
    background: #3e3e42;
    border: 1px solid #5a5a5a;
    color: #d4d4d4;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    width: 200px;
    flex-shrink: 0; /* Prevent search input from shrinking */
    min-width: 200px; /* Maintain full width */
    max-width: 200px; /* Prevent expansion */
}

.search-input:focus {
    outline: none;
    border-color: #007acc;
}

.addins-dropdown {
    background: #3e3e42;
    border: 1px solid #5a5a5a;
    color: #d4d4d4;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    flex-shrink: 0; /* Prevent dropdown from shrinking */
    white-space: nowrap; /* Prevent text wrapping */
}

/* Panes Container - Fixed responsive layout */
.panes-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 420px; /* Fixed right column width for 6 thermometers */
    gap: 1px;
    background: #3e3e42;
    min-height: 0;
    overflow: hidden;
    position: relative;
    min-width: 600px; /* Prevents total collapse */
}

.left-column {
    min-width: 200px; /* Prevents left column collapse */
}

.right-column {
    min-width: 320px; /* Ensures right column can fit 6 thermometers */
    max-width: 420px; /* Prevents right column from getting too wide */
}

/* Left column container - 60% top (source), 40% bottom (console) */
.left-column {
    display: grid;
    grid-template-rows: 3fr 2fr; /* 60% / 40% split */
    gap: 1px;
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}

/* Right column container - 25% top (environment), 75% bottom (plots) */
.right-column {
    display: grid;
    grid-template-rows: 1fr 3fr; /* 25% / 75% split */
    gap: 1px; /* Fixed: negative gap was causing layout issues */
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}

/* No resize handles needed - using fixed responsive layout */

/* Pane Styles */
.pane {
    background: #1e1e1e;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.pane-header {
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    height: 30px;
}

.pane-tabs {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Allow horizontal scroll if needed */
    flex-shrink: 0; /* Don't shrink the tabs container */
}

.tab {
    background: #3e3e42;
    color: #cccccc;
    padding: 4px 12px;
    border-radius: 4px 4px 0 0;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 2px solid transparent;
    white-space: nowrap; /* Prevent text wrapping inside tabs */
    flex-shrink: 0; /* Prevent individual tabs from shrinking */
}

.tab.active {
    background: #1e1e1e;
    color: #ffffff;
    border-bottom-color: #007acc;
}

.tab:hover {
    background: #4a4a4a;
}

.tab i.fa-times {
    margin-left: 5px;
    opacity: 0.7;
}

.tab i.fa-times:hover {
    opacity: 1;
}

.pane-toolbar {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    align-items: center;
}

.pane-btn {
    background: transparent;
    border: none;
    color: #cccccc;
    padding: 2px 6px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 10px;
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pane-btn:hover {
    background: #3e3e42;
}

.run-btn {
    color: #4caf50;
}

.pane-content {
    flex: 1;
    overflow: auto;
    padding: 10px;
    min-height: 0;
}

/* Source Pane */
.source-pane {
    grid-column: 1;
    grid-row: 1;
}

.code-editor {
    display: flex;
    height: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    overflow-y: auto; /* scroll container so line numbers move with text */
    overflow-x: hidden;
}

/* ================================================
   CODE EDITOR STYLES - Saved for Future Use
   ================================================
   These styles are for code editor tabs with line numbers.
   Currently not in use but retained for future features.
   See workspace switching functionality in rstudio-script.js
   ================================================ */

.line-numbers {
    background: #252526;
    color: #858585;
    padding: 10px 8px;
    border-right: 1px solid #3e3e42;
    text-align: right;
    user-select: none;
    min-width: 40px;
    flex-shrink: 0;
    overflow: hidden;
}

.line-number {
    display: block;
    line-height: 1.4;
}

.code-content {
    flex: 1;
    padding: 10px;
    overflow: visible; /* vertical scroll handled by .code-editor */
    overflow-x: hidden;
}

.code-content.editable {
    flex: 1;
    padding: 10px;
    overflow: auto;
    overflow-x: hidden;
    outline: none;
    cursor: text;
}

.code-content.editable:focus {
    background: rgba(255, 255, 255, 0.02);
}

.code-content.editable:empty:before {
    content: "Click here to edit code...";
    color: #666;
    font-style: italic;
}

.code-line {
    line-height: 1.4;
    margin-bottom: 2px;
}

.keyword {
    color: #569cd6;
    font-weight: 500;
}

.string {
    color: #ce9178;
}

.comment {
    color: #6a9955;
    font-style: italic;
}

.function {
    color: #dcdcaa;
}

/* Console Pane */
.console-pane {
    grid-column: 1;
    grid-row: 2;
}

.console-output {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    scroll-behavior: smooth;
    overflow-y: auto;
    height: 100%;
    max-height: 100%;
}

.console-line {
    margin-bottom: 2px;
}

.cursor {
    animation: blink 1s infinite;
    color: #ffffff;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Environment Pane */
.environment-pane {
    grid-column: 2;
    grid-row: 1;
}

.environment-content {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.search-bar {
    margin-bottom: 10px;
}

.search-bar input {
    width: 100%;
    background: #3e3e42;
    border: 1px solid #5a5a5a;
    color: #d4d4d4;
    padding: 6px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.search-bar input:focus {
    outline: none;
    border-color: #007acc;
}

.environment-objects {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.object-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: #2d2d30;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.object-item:hover {
    background: #3e3e42;
}

.object-item i {
    color: #569cd6;
    width: 15px;
    font-size: 11px;
}

.object-name {
    color: #ffffff;
    font-weight: 500;
    min-width: 113px;
    font-size: 11px;
}

.object-type {
    color: #4ec9b0;
    font-size: 10px;
    min-width: 75px;
}

.object-size {
    color: #858585;
    font-size: 10px;
    margin-left: auto;
}

/* Cow Gallery Styles */
.cow-gallery-container {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3e3e42;
}

.gallery-header h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.gallery-counter {
    color: #808080;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.gallery-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.nav-btn {
    background: #2d2d30;
    border: 2px solid #3e3e42;
    color: #d4d4d4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: #3e3e42;
    border-color: #007acc;
    color: #ffffff;
}

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

.cow-display {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    flex: 1;
    max-width: 800px;
    width: 100%;
    height: 100%;
}

.cow-image-container {
    width: 220px;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    background: #2d2d30;
    border: 2px solid #3e3e42;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    align-self: center;
    margin-top: 10px;
}

.cow-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cow-image:hover {
    transform: scale(1.05);
}

.cow-info {
    text-align: left;
    flex: 0 0 175px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    margin-top: 15px;
}

.cow-info h4 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 3px 0;
}

.cow-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 0;
    border-bottom: 1px solid #3e3e42;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #808080;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span:last-child {
    color: #d4d4d4;
    font-size: 14px;
    font-weight: 400;
    margin-left: 0;
}

.cow-story {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    align-self: center;
    margin-left: 10px;
    max-height: 80%;
    margin-top: 10px;
}

.story-label {
    color: #808080;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.story-content {
    color: #d4d4d4;
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
    background: rgba(45, 45, 48, 0.4);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007acc;
    height: 200px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3e3e42;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-dot.active {
    background: #007acc;
    transform: scale(1.2);
}

.gallery-dot:hover {
    background: #5a5a5a;
}

/* Game Pane Styles */
.game-container {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3e3e42;
}

.game-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    font-size: 10px;
    color: #808080;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    color: #d4d4d4;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.game-controls {
    display: flex;
    gap: 8px;
}

.game-btn {
    background: #ffdb77;
    color: #333;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
    min-width: 80px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
}

.game-btn:hover {
    background: #e0aa2c;
}

.game-btn:disabled {
    background: #3e3e42;
    cursor: not-allowed;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    flex: 1;
    margin-bottom: 15px;
}

.cow-hole {
    background: #2d2d30;
    border: 2px solid #3e3e42;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cow-hole:hover {
    border-color: #007acc;
}

.cow-hole.active {
    background: #4ec9b0;
    border-color: #4ec9b0;
    animation: cowPop 0.3s ease-out;
}

.cow-hole.active::before {
    content: "🐄";
    font-size: 24px;
    animation: cowBounce 0.3s ease-out;
}

.cow-hole.fed {
    background: #4ec9b0;
    border-color: #4ec9b0;
    animation: cowFed 0.6s ease-out;
    box-shadow: 0 0 15px rgba(78, 201, 176, 0.6);
}

.cow-hole.fed::before {
    content: "🌾";
    font-size: 24px;
    animation: haySuccess 0.6s ease-out;
}

.game-instructions {
    text-align: center;
    color: #808080;
    font-size: 11px;
    line-height: 1.4;
}

.game-instructions p {
    margin: 4px 0;
}

/* Animations */
@keyframes cowPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes cowBounce {
    0% { transform: translateY(10px); opacity: 0; }
    50% { transform: translateY(-5px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes cowFed {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0px rgba(78, 201, 176, 0);
    }
    30% { 
        transform: scale(1.1); 
        box-shadow: 0 0 20px rgba(78, 201, 176, 0.8);
    }
    60% { 
        transform: scale(1.05); 
        box-shadow: 0 0 15px rgba(78, 201, 176, 0.6);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 15px rgba(78, 201, 176, 0.6);
    }
}

@keyframes haySuccess {
    0% { 
        transform: translateY(0px) scale(0.5); 
        opacity: 0; 
    }
    20% { 
        transform: translateY(-5px) scale(1.2); 
        opacity: 1; 
    }
    40% { 
        transform: translateY(-10px) scale(1.4); 
        opacity: 1; 
    }
    60% { 
        transform: translateY(-15px) scale(1.2); 
        opacity: 1; 
    }
    80% { 
        transform: translateY(-20px) scale(1.0); 
        opacity: 0.8; 
    }
    100% { 
        transform: translateY(-25px) scale(0.8); 
        opacity: 0; 
    }
}

/* Plots Pane */
.plots-pane {
    grid-column: 2;
    grid-row: 2;
    margin-top: 3px; /* Just a tiny bit lower */
}

.plots-content,
.this-week-content,
.lifetime-content,
.mfre-content {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Prevent flex item from overflowing */
}

/* Time Tracker Styles - Modern Dark Design */
.this-week-content,
.lifetime-content,
.mfre-content {
    padding: 15px;
    background: #1e1e1e;
    border-radius: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(200, 200, 200, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.week-header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(150, 150, 150, 0.15);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    padding-left: 8px;
    margin-left: -8px;
    margin-right: -8px;
    padding-right: 8px;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.week-header-title h3 {
    color: #e4e6e8;
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.total-hours {
    color: #a0a5ab;
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(150, 150, 150, 0.15);
}

.total-hours span {
    color: #d4d7db;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(200, 200, 200, 0.2);
}

.week-subtitle {
    color: #808691;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.thermometer-container {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-end;
    gap: 16px;
    padding: 20px 10px 15px 20px;
    min-height: 250px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(150, 150, 150, 0.08);
    border-radius: 12px;
    width: 100%;
    max-width: none;
    margin-bottom: 10px;
    margin-top: 20px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    flex-wrap: nowrap;
    overflow-x: auto;
}

.thermometer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 50px; /* Reduced minimum width to accommodate more items */
    max-width: 80px; /* Prevent thermometers from getting too wide */
    transition: transform 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking below min-width */
}

/* Responsive thermometer sizing for different screen sizes */
@media (max-width: 1200px) {
    .thermometer {
        min-width: 45px;
        max-width: 70px;
    }
}

@media (max-width: 900px) {
    .thermometer {
        min-width: 40px;
        max-width: 60px;
    }
    
    .thermometer-container {
        gap: 20px;
        padding: 15px 8px 12px 15px;
    }
}

@media (max-width: 600px) {
    .thermometer {
        min-width: 35px;
        max-width: 50px;
    }
    
    .thermometer-container {
        gap: 16px;
        padding: 12px 6px 10px 12px;
    }
}

.thermometer:hover {
    transform: translateY(-4px);
}

.thermometer-name {
    color: #b8c0c8;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    width: 100%;
    min-height: 36px;
    max-height: 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
    word-wrap: break-word;
    hyphens: auto;
}

.thermometer-tube {
    width: 34px;
    height: 150px;
    background: rgba(25, 27, 30, 0.8);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.thermometer:hover .thermometer-tube {
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.4);
}

.thermometer-fill {
    width: 100%;
    border-radius: 6px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 -2px 20px currentColor,
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

.thermometer-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 6px 6px 0 0;
}

.thermometer:hover .thermometer-fill {
    filter: brightness(1.2);
    box-shadow: 
        0 -4px 30px currentColor,
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.thermometer-hours {
    color: #a0a5ab;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(150, 150, 150, 0.12);
    transition: all 0.3s ease;
}

.thermometer:hover .thermometer-hours {
    color: #d4d7db;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(150, 150, 150, 0.25);
    text-shadow: 0 0 8px rgba(200, 200, 200, 0.3);
}

.tracker-footer {
    padding: 10px 0 0;
    text-align: center;
    color: #5a5f68;
    font-size: 10px;
    font-style: italic;
    letter-spacing: 0.3px;
}

.tracker-footer p {
    margin: 0;
}

.tracker-footer span {
    font-weight: 500;
    color: #7a8086;
}

/* Placeholder content styles */
.placeholder-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-message {
    text-align: center;
    color: #858585;
}

.placeholder-message i {
    font-size: 48px;
    color: #3e3e42;
    margin-bottom: 15px;
}

.placeholder-message p {
    font-size: 14px;
    margin: 0;
}

.plot-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 20px;
    min-height: 300px;
    position: relative;
}

.plot-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.plot-info {
    background: #2d2d30;
    padding: 15px;
    border-radius: 5px;
}

.plot-info h4 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 14px;
}

.plot-info p {
    color: #cccccc;
    font-size: 12px;
    margin-bottom: 10px;
}

.plot-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.stat-label {
    color: #858585;
    font-size: 10px;
}

.stat-value {
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
}

/* Additional medium-small screen adjustments */
@media (max-width: 800px) {
    /* Smaller fixed right column for small screens */
    .panes-container {
        grid-template-columns: 1fr 320px; /* Smaller fixed right column */
    }
    
    /* Make elements even more compact */
    .cow-image-container {
        width: 120px;
        height: 120px;
    }
    
    .story-content {
        height: 100px;
        font-size: 11px;
    }
    
    .cow-details {
        font-size: 12px;
    }
    
    .cow-info h4 {
        text-align: center; /* Center the cow name */
    }
}

/* Mobile-like layout for very narrow screens */
@media (max-width: 600px) {
    .panes-container {
        grid-template-columns: 1fr; /* Single column layout */
        grid-template-rows: auto; /* Let content determine height */
        gap: 2px;
        overflow-y: auto; /* Allow vertical scrolling */
    }
    
    /* Reorder to prioritize cow gallery */
    .left-column {
        grid-template-rows: 1fr; /* Only show the top pane (cow gallery) */
        order: 1; /* Show first */
    }
    
    .right-column {
        grid-template-rows: 1fr 1fr; /* Show both environment and plots */
        order: 2; /* Show after cow gallery */
    }
    
    /* Hide console on mobile to focus on cow gallery */
    .console-pane {
        display: none;
    }
    
    /* Make cow gallery mobile-optimized */
    .cow-gallery-container {
        padding: 15px;
    }
    
    .cow-display {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cow-image-container {
        width: 200px;
        height: 200px;
    }
    
    .cow-info {
        text-align: center;
        width: 100%;
        align-self: center;
        margin: 0 auto;
    }
    
    .cow-info h4 {
        text-align: center; /* Center the cow name */
    }
    
    .cow-story {
        margin: 10px 0 0 0;
    }
    
    .story-content {
        height: 150px;
        font-size: 13px;
    }
    
    /* Make navigation buttons more touch-friendly */
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .gallery-dots {
        margin-top: 20px;
    }
    
    .gallery-dot {
        width: 12px;
        height: 12px;
        margin: 0 8px;
    }
    
    /* Make tabs more compact on mobile */
    .tab {
        padding: 3px 8px;
        font-size: 10px;
        gap: 3px;
    }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 400px) {
    .menu-left {
        gap: 4px;
    }
    
    .menu-item {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .search-input {
        width: 100px;
    }
    
    .cow-image-container {
        width: 180px;
        height: 180px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Better responsive behavior for medium screens */
@media (max-width: 1000px) {
    /* Maintain fixed right column width for consistency */
    .panes-container {
        grid-template-columns: 1fr 380px; /* Slightly smaller right column for medium screens */
    }
    
    /* Make cow gallery more compact */
    .cow-display {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .cow-image-container {
        width: 140px;
        height: 140px;
    }
    
    .cow-info {
        text-align: center;
        flex: none;
        width: 100%;
        align-self: center;
        margin: 0 auto;
    }
    
    .cow-info h4 {
        text-align: center; /* Center the cow name */
    }
    
    .cow-story {
        margin-left: 0;
        margin-top: 8px;
        max-height: 120px; /* Smaller on medium screens */
    }
    
    .story-content {
        height: 120px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .window-title {
        display: none;
    }
    
    .menu-left {
        gap: 5px;
    }
    
    .menu-item {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    /* Keep toolbar elements compact but maintain proper sizes */
    .search-input {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2d2d30;
}

::-webkit-scrollbar-thumb {
    background: #5a5a5a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a6a6a;
}

/* Animation for pane interactions */
.pane-content {
    transition: all 0.3s ease;
}

.object-item {
    transition: all 0.2s ease;
}

.tab {
    transition: all 0.2s ease;
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Pixel Pasture Styles */
.pixel-pasture-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px;
    gap: 10px;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 70%, #228B22 100%);
    border-radius: 8px;
    overflow: hidden;
}

.pasture-controls {
    display: flex;
    gap: 10px;
}

.pasture-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pasture-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.pasture-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.pixel-canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border-radius: 8px;
    border: 3px solid #4682B4;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

#pixel-canvas {
    border-radius: 4px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background: transparent;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: 100%;
    height: 100%;
}

.pasture-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.9);
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 5px;
}

.stat-items {
    display: flex;
    gap: 30px;
}

.pasture-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pasture-stats .stat-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.pasture-stats .stat-value {
    font-size: 14px;
    color: #2F4F2F;
    font-weight: 600;
}
