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

:root {
    /* Light theme variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #000000;
    --text-secondary: #1e293b;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-title: #000000;
    --card-value: #1e293b;
    --tank-card-bg: rgba(255, 255, 255, 0.8);
    --tank-card-border: rgba(0, 0, 0, 0.05);
    --tank-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --tank-level-bg: linear-gradient(180deg, #fdba74, #f97316);
    --tank-level-low: linear-gradient(180deg, #fca5a5, #ef4444);
    --tank-level-high: linear-gradient(180deg, #60a5fa, #3b82f6);
    --button-bg: #ffffff;
    --button-text: #000000;
    --button-border: rgba(0, 0, 0, 0.1);
    --button-hover: #f8fafc;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f8fafc;
    --sidebar-active: #f1f5f9;
    --navbar-bg: linear-gradient(135deg, #f8fafc, #f1f5f9);
    --navbar-border: rgba(0, 0, 0, 0.05);
    --navbar-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    --navbar-text: #1e293b;
    --navbar-text-secondary: #64748b;
    --navbar-button-bg: #ffffff;
    --navbar-button-border: rgba(0, 0, 0, 0.05);
    --navbar-button-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    --navbar-button-hover: #f8fafc;
    --modal-bg: #ffffff;
    --modal-text: #000000;
    --input-bg: #ffffff;
    --input-text: #000000;
    --input-border: rgba(0, 0, 0, 0.1);
    --input-focus: #000000;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-bg: #f1f5f9;
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --background-dark: #1e293b;
    --text-light: #f8fafc;
    --text-dark: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --sidebar-text: #1e293b;
    --sidebar-text-hover: #000000;
    --card-title: #000000;
    --card-value: #1e293b;
    --tank-card-bg: rgba(255, 255, 255, 0.8);
    --tank-card-border: rgba(0, 0, 0, 0.05);
    --tank-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --sidebar-bg: #1e293b;
    --navbar-bg: rgba(17, 24, 39, 0.8);
    --navbar-border: rgba(255, 255, 255, 0.1);
    --navbar-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --navbar-text: #f8fafc;
    --navbar-text-secondary: #94a3b8;
    --navbar-button-bg: rgba(255, 255, 255, 0.05);
    --navbar-button-border: rgba(255, 255, 255, 0.1);
    --navbar-button-shadow: none;
    --navbar-button-hover: rgba(255, 255, 255, 0.1);
    --tank-bg: #1e293b;
    --tank-border: #334155;
    --tank-level-bg: linear-gradient(180deg, #3b82f6, #2563eb);
    --tank-level-low: linear-gradient(180deg, #ef4444, #dc2626);
    --tank-level-medium: linear-gradient(180deg, #f97316, #ea580c);
    --tank-level-high: linear-gradient(180deg, #3b82f6, #2563eb);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-bg: #334155;
    --sidebar-text: #f8fafc;
    --sidebar-text-hover: #60a5fa;
    --card-title: #94a3b8;
    --card-value: #f8fafc;
    --tank-card-bg: rgba(17, 24, 39, 0.8);
    --tank-card-border: rgba(255, 255, 255, 0.1);
    --tank-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, 
        rgba(100, 116, 139, 0.1) 0%, 
        rgba(71, 85, 105, 0.1) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--navbar-text);
    font-weight: 600;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
    display: flex;
    align-items: flex-end;
    gap: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #f43f5e, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.logo .version {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    opacity: 0.8;
    text-shadow: none;
    -webkit-text-fill-color: var(--text-secondary);
}

[data-theme="dark"] .logo {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .logo .version {
    color: #94a3b8;
    -webkit-text-fill-color: #94a3b8;
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.navbar-time {
    color: var(--navbar-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-time i {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.theme-toggle:active {
    transform: translateY(0);
}

.theme-toggle i {
    font-size: 1rem;
}

#refresh-button {
    background: none;
    border: none;
    color: #f97316;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

#refresh-button:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
    transform: translateY(-2px);
}

#refresh-button:active {
    transform: translateY(0);
}

#refresh-button i {
    font-size: 1rem;
}

/* Dark mode adjustments */
[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, 
        rgba(51, 65, 85, 0.2) 0%, 
        rgba(30, 41, 59, 0.2) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .navbar-controls {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] #refresh-button {
    color: #f97316;
}

[data-theme="dark"] #refresh-button:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

/* App Container with Sidebar and Main Content */
.app-container {
    display: flex;
    height: calc(100vh - 90px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #ffffff;
    backdrop-filter: blur(10px);
    padding: 16px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
}

/* Dark mode adjustments */
[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

/* Sidebar Stats */
.sidebar-stats {
    padding: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    order: 1;
}

[data-theme="dark"] .sidebar-stats {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gauge-container {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

[data-theme="dark"] .gauge-label {
    color: #94a3b8;
}

.gauge-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gauge-value i {
    font-size: 1.1rem;
    color: #3b82f6;
}

[data-theme="dark"] .gauge-value {
    color: #e2e8f0;
}

/* Gauge Styles */
.gauge {
    width: 100%;
    height: 100%;
    position: relative;
}

.gauge-body {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    transform-origin: center;
    transform: rotate(-90deg);
    transition: transform 0.3s ease;
}

.gauge-cover {
    position: absolute;
    width: 85%;
    height: 85%;
    background: var(--bg-secondary);
    border-radius: 50%;
    top: 7.5%;
    left: 7.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Update the gauge fill based on the total tanks value */
.gauge-fill {
    clip-path: polygon(50% 50%, 100% 0, 100% 100%, 50% 50%);
    transform-origin: center;
    transform: rotate(-90deg);
}

/* Add animation for the gauge fill */
@keyframes gaugeFill {
    from {
        transform: rotate(-90deg);
    }
    to {
        transform: rotate(270deg);
    }
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    order: 2;
    margin-bottom: auto;
}

.sidebar-menu li {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    margin: 4px 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .sidebar-menu li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu li i {
    margin-right: 12px;
    font-size: 18px;
    transition: all 0.3s;
    width: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.sidebar-menu li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu li:hover i {
    transform: scale(1.1);
    color: #f43f5e;
}

.sidebar-menu li.active {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(249, 115, 22, 0.15));
    border-color: rgba(244, 63, 94, 0.2);
}

.sidebar-menu li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #f43f5e, #f97316);
    border-radius: 0 4px 4px 0;
}

.sidebar-menu li.active i {
    color: #f43f5e;
    transform: scale(1.1);
}

/* Sidebar Alerts */
.sidebar-alerts {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 16px;
    margin: 16px 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    order: 3;
    margin-top: auto;
    gap: 16px;
}

[data-theme="dark"] .sidebar-alerts {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.alert-count {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 120px;
    justify-content: center;
}

.alert-count:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.alert-count i {
    font-size: 1.2rem;
}

.alert-count:first-child i {
    color: #f43f5e;
}

.alert-count:last-child i {
    color: #60a5fa;
}

.alert-count span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    text-align: center;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #ffffff;
    transition: background-color 0.3s ease;
}

/* Dark mode adjustments */
[data-theme="dark"] .main-content {
    background: var(--bg-primary);
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.card {
    position: relative;
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: none;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card:hover::after {
    transform: translateX(100%);
}

.card-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-value i {
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card specific styles with 3D effect */
.card:nth-child(1) {
    background: linear-gradient(135deg, #fecdd3, #f43f5e);
    box-shadow: 
        0 8px 32px rgba(244, 63, 94, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card:nth-child(2) {
    background: linear-gradient(135deg, #bfdbfe, #3b82f6);
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card:nth-child(3) {
    background: linear-gradient(135deg, #fed7aa, #f97316);
    box-shadow: 
        0 8px 32px rgba(249, 115, 22, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card:nth-child(4) {
    background: linear-gradient(135deg, #86efac, #22c55e);
    box-shadow: 
        0 8px 32px rgba(34, 197, 94, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Dark mode adjustments */
[data-theme="dark"] .card {
    background: rgba(30, 41, 59, 0.3);
}

[data-theme="dark"] .card:nth-child(1) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
}

[data-theme="dark"] .card:nth-child(2) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
}

[data-theme="dark"] .card:nth-child(3) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
}

[data-theme="dark"] .card:nth-child(4) {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(219, 39, 119, 0.15));
}

[data-theme="dark"] .card .card-title {
    color: var(--card-title);
    text-shadow: none;
}

[data-theme="dark"] .card .card-value {
    color: var(--card-value);
    text-shadow: none;
}

/* Hover effects */
.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card:hover .card-value i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
}

.card:hover .card-value span {
    transform: scale(1.05);
}

/* Card value animation */
.card-value span {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab Content */
.tab-content {
    background: transparent;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tab-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-panel.active {
    display: block;
    opacity: 1;
}

/* Temperature Tab Styles */
#temperature-panel {
    display: none;
}

#temperature-panel.active {
    display: block;
}

.temperature-container {
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.temp-readings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Dark mode adjustments */
[data-theme="dark"] .temperature-container {
    background: var(--bg-secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Tanks container */
.tanks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tanks-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.tank-wrapper {
    flex: 1;
    min-width: 0;
    background: linear-gradient(135deg, 
        rgba(241, 245, 249, 0.8) 0%, 
        rgba(226, 232, 240, 0.8) 100%
    );
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tank-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark mode adjustments */
[data-theme="dark"] .tank-wrapper {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.8) 100%
    );
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tank-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Tank styles */
.tank {
    background: var(--tank-card-bg);
    border: 1px solid var(--tank-card-border);
    box-shadow: var(--tank-card-shadow);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    height: 320px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tank:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.tank-label {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.tank-capacity {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tank-container {
    flex: 1;
    position: relative;
    width: 180px;
    margin: 0 auto;
    border-radius: 12px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
    overflow: hidden;
    border: 2px solid #94a3b8;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.tank-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--tank-level-bg);
    transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    height: 0%;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.tank-level::before, .tank-level::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scaleX(1.5);
}

.tank-level::before {
    top: -8px;
    animation: wave 2.5s infinite ease-in-out;
}

.tank-level::after {
    top: -4px;
    animation: wave 2s infinite ease-in-out reverse;
    opacity: 0.6;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0) scaleX(1.5);
    }
    50% {
        transform: translateY(6px) scaleX(1.5);
    }
}

.tank-markings {
    position: absolute;
    right: 10px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    z-index: 1;
    padding: 8px 0;
}

.tank-markings span {
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    color: var(--text-secondary);
}

.tank-markings span::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.7);
    left: -12px;
    top: 50%;
}

.tank-info {
    margin-top: 16px;
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.volume-text, .temp-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.volume-text i {
    color: #60a5fa;
    font-size: 16px;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

.temp-text i {
    color: #f43f5e;
    font-size: 16px;
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.5));
}

/* Temperature Tab */
.temperature-container {
    padding: 20px;
}

.temperature-container h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.temp-readings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    padding: 16px;
    justify-items: center;
}

.temp-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.temp-gauge .gauge-container {
    width: 120px;
    height: 120px;
}

.temp-gauge .gauge-fill {
    background: linear-gradient(135deg, #f43f5e, #f97316);
}

.temp-gauge .gauge-value i {
    color: #f43f5e;
    filter: drop-shadow(0 0 4px rgba(244, 63, 94, 0.3));
}

.temp-gauge .gauge-value span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.temp-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Temperature gauge hover effects */
.temp-gauge:hover .gauge-value i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.5));
}

.temp-gauge:hover .gauge-value span {
    transform: scale(1.05);
}

/* Dark mode adjustments */
[data-theme="dark"] .temp-gauge .gauge-body {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .temp-gauge .gauge-cover {
    background: var(--bg-primary);
}

/* Controls */
.controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
    padding: 0;
}

#status-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 16px;
}

#refresh-button {
    background: none;
    border: none;
    color: #f97316;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

#refresh-button:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
    transform: translateY(-2px);
}

#refresh-button:active {
    transform: translateY(0);
}

#refresh-button i {
    font-size: 1rem;
}

/* Responsive Design Rules */
@media (max-width: 1200px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .tanks-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .tank {
        height: 300px;
        padding: 16px;
    }

    .tank-container {
        width: 160px;
    }

    .tank-label {
        font-size: 1.1rem;
    }

    .tank-capacity {
        font-size: 0.85rem;
    }

    .volume-text, .temp-text {
        font-size: 0.95rem;
        gap: 6px;
    }

    .volume-text i, .temp-text i {
        font-size: 16px;
    }

    .tank-info {
        padding: 10px;
        margin-top: 14px;
    }
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: row;
    }

    .sidebar {
        width: 220px;
        height: calc(100vh - 60px);
        padding: 12px;
    }

    .sidebar-stats {
        padding: 12px;
        margin-bottom: 12px;
    }

    .sidebar-menu li {
        padding: 10px 14px;
    }

    .sidebar-alerts {
        padding: 12px;
        margin: 12px 0;
    }

    .sidebar-footer {
        padding: 12px;
    }

    .main-content {
        height: calc(100vh - 60px);
        overflow-y: auto;
        padding: 1rem;
    }

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tanks-container {
        padding: 1rem;
    }

    .tanks-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .tank {
        height: 280px;
        padding: 14px;
    }

    .tank-container {
        width: 140px;
    }

    .tank-label {
        font-size: 1rem;
    }

    .tank-capacity {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .tank-markings {
        font-size: 10px;
        right: 8px;
    }

    .tank-info {
        padding: 8px;
        margin-top: 12px;
        flex-direction: row;
        justify-content: space-between;
    }

    .volume-text, .temp-text {
        font-size: 0.8rem;
        gap: 4px;
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .volume-text i, .temp-text i {
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .tank-info {
        padding: 6px;
        margin-top: 10px;
    }

    .volume-text, .temp-text {
        font-size: 0.75rem;
        gap: 3px;
        flex-direction: column;
        align-items: center;
    }

    .volume-text i, .temp-text i {
        font-size: 11px;
    }
}

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

    .sidebar {
        display: none;
    }

    .mobile-menu {
        display: block !important;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: 100px; /* Increased padding to account for fixed bottom menu */
    }

    .navbar {
        padding: 0.75rem 1rem;
        background: linear-gradient(135deg, 
            rgba(100, 116, 139, 0.1) 0%, 
            rgba(71, 85, 105, 0.1) 100%
        );
    }

    .logo {
        font-size: 1.8rem;
    }

    .logo .version {
        font-size: 1rem;
    }

    .navbar-controls {
        gap: 1rem;
        padding: 0.5rem;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .tanks-row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .tank-wrapper {
        padding: 12px;
    }

    .tank {
        height: 250px;
        padding: 12px;
    }

    .tank-container {
        width: 120px;
    }

    .tank-label {
        font-size: 0.95rem;
    }

    .tank-capacity {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .tank-markings {
        font-size: 9px;
        right: 6px;
    }

    .tank-markings span::after {
        width: 6px;
        left: -10px;
    }

    .tank-info {
        padding: 6px;
        margin-top: 8px;
        flex-direction: row;
    }

    .volume-text, .temp-text {
        font-size: 0.7rem;
        gap: 3px;
        flex: 1;
        justify-content: center;
        flex-direction: row;
        align-items: center;
    }

    .volume-text i, .temp-text i {
        font-size: 10px;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .sidebar-alerts {
        padding: 12px;
        margin: 12px 0;
    }

    .alert-count {
        padding: 6px 12px;
        min-width: 100px;
    }

    .tanks-container {
        margin-bottom: 20px; /* Add extra margin to ensure last tank is visible */
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-controls {
        flex-direction: column;
        align-items: flex-end;
    }

    .sidebar-menu {
        flex-direction: column;
        width: 100%;
    }

    .sidebar-menu li {
        width: 100%;
        justify-content: center;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
    }

    .card {
        padding: 1rem;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-value {
        font-size: 1.2rem;
    }

    .tank-markings span {
        font-size: 0.7rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .form-group input {
        font-size: 0.9rem;
    }

    .tank {
        height: 220px;
        padding: 10px;
    }

    .tank-container {
        width: 100px;
    }

    .tank-label {
        font-size: 0.9rem;
    }

    .tank-capacity {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }

    .tank-markings {
        font-size: 8px;
        right: 4px;
    }

    .tank-markings span::after {
        width: 4px;
        left: -8px;
    }

    .tank-info {
        padding: 6px;
        margin-top: 8px;
    }

    .volume-text, .temp-text {
        font-size: 0.7rem;
        gap: 3px;
    }

    .volume-text i, .temp-text i {
        font-size: 10px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .tank:hover {
        transform: none;
    }

    .theme-toggle,
    .edit-btn,
    .delete-btn,
    .submit-btn {
        padding: 0.75rem;
    }

    .volume-control input[type="range"] {
        height: 20px;
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 600px) and (orientation: landscape) {
    .app-container {
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        height: auto;
        padding: 0.5rem;
    }

    .sidebar-menu li {
        padding: 0.5rem 1rem;
    }

    .tank {
        height: 200px;
    }

    .tank-container {
        width: 100px;
    }

    .tank-label {
        font-size: 0.9rem;
    }

    .tank-capacity {
        font-size: 0.7rem;
    }

    .tank-markings {
        font-size: 8px;
    }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tank-level {
        background-size: 200% 200%;
    }
}

/* Print Styles */
@media print {
    .navbar-controls,
    .sidebar-footer,
    .theme-toggle,
    .edit-btn,
    .delete-btn {
        display: none;
    }

    .app-container {
        display: block;
    }

    .sidebar {
        width: 100%;
        border: none;
        box-shadow: none;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .tank {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Animations */
@keyframes wave {
    0%, 100% {
        transform: translateY(0) scaleX(1.5);
    }
    50% {
        transform: translateY(6px) scaleX(1.5);
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Settings Panel */
.settings-container {
    padding: 24px;
}

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

.settings-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-tank-btn {
    background: linear-gradient(135deg, #f43f5e, #f97316);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.add-tank-btn:hover {
    background: linear-gradient(135deg, #dc2626, #ea580c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2);
}

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

.tanks-list {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.tanks-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.tank-col {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tanks-list-body {
    padding: 8px;
}

.tank-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    color: var(--text-primary);
}

.tank-item:hover {
    background: var(--hover-bg);
}

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

.tank-actions {
    display: flex;
    gap: 8px;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.edit-btn {
    background: var(--primary-color);
    color: #fff;
}

.delete-btn {
    background: #ef4444;
    color: #fff;
}

.edit-btn:hover, .delete-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.cancel-btn, .submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.cancel-btn {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.submit-btn {
    background: var(--primary-color);
    color: #fff;
}

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

.submit-btn:hover {
    background: var(--secondary-color);
}

.cancel-btn:hover {
    background: var(--hover-bg);
}

/* System Settings */
.settings-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.settings-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.setting-item input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.setting-item input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.save-settings-btn {
    background: linear-gradient(135deg, #f43f5e, #f97316);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    margin-top: 8px;
}

.save-settings-btn:hover {
    background: linear-gradient(135deg, #dc2626, #ea580c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2);
}

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

/* Alert Modal */
.alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-content i {
    font-size: 2rem;
    color: #ef4444;
}

.alert-content p {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.5;
}

#alertModal .modal-content {
    max-width: 400px;
}

#alertModal .submit-btn {
    width: 100%;
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

#alertModal .submit-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

#alertModal .submit-btn:active {
    transform: translateY(0);
}

/* Notification Container */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: var(--card-bg);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    max-width: 100%;
}

.notification i {
    color: #ef4444;
    font-size: 1.2rem;
}

.notification p {
    color: var(--text-primary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

[data-theme="dark"] .notification p {
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification.hide {
    animation: slideOut 0.3s ease-out forwards;
}

/* Volume Control Styles */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.volume-value {
    min-width: 45px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dark mode adjustments */
[data-theme="dark"] .volume-control input[type="range"] {
    background: var(--border-color);
}

[data-theme="dark"] .volume-control input[type="range"]::-webkit-slider-thumb {
    background: var(--primary-color);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-top: 8px;
}

.dashboard-header-left {
    display: flex;
    flex-direction: column;
    row-gap: 1px;
    column-gap: 4px;
}

.dashboard-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    background: linear-gradient(135deg, #f43f5e, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.dashboard-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, 
        #f43f5e 0%,
        transparent 100%
    );
    border-radius: 1px;
}

.dashboard-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: 0;
    display: block;
    padding-top: 4px;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.last-updated {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.last-updated i {
    font-size: 0.8rem;
    color: #3b82f6;
}

/* Dark mode adjustments */
[data-theme="dark"] .last-updated {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .last-updated i {
    color: #60a5fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dashboard-title {
        font-size: 1.3rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.75rem;
    }

    .dashboard-header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .last-updated {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}

/* Add this to the card specific styles section */
.card:nth-child(5) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    box-shadow: 
        0 8px 32px rgba(239, 68, 68, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card:nth-child(5) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
}

.card:nth-child(5) .card-value i {
    color: #ef4444;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

.card:nth-child(5):hover .card-value i {
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.7));
}

/* Alert Details Styles */
.alert-details {
    display: flex;
    justify-content: space-around;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-type {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.alert-type i {
    font-size: 1rem;
}

.alert-type:first-child i {
    color: #f43f5e;
}

.alert-type:last-child i {
    color: #60a5fa;
}

.alert-type span {
    font-weight: 500;
    color: var(--text-primary);
}

[data-theme="dark"] .alert-details {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Show mobile menu only on mobile screens */
@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    
    .main-content {
        padding-bottom: 120px; /* Increased padding to account for fixed bottom menu */
    }

    .tanks-container {
        margin-bottom: 40px; /* Increased margin to ensure last tank is visible */
    }

    .tank-wrapper {
        margin-bottom: 20px; /* Add margin between tank wrappers */
    }

    .tank-wrapper:last-child {
        margin-bottom: 40px; /* Extra margin for the last tank */
    }
}

/* Hide mobile menu on larger screens */
@media (min-width: 769px) {
    .mobile-menu {
        display: none;
    }
    
    .main-content {
        padding-bottom: 0;
    }

    .tanks-container {
        margin-bottom: 0;
    }

    .tank-wrapper {
        margin-bottom: 0;
    }

    .tank-wrapper:last-child {
        margin-bottom: 0;
    }
}

.mobile-menu-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 12px;
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.mobile-menu-item.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

#mobile-refresh-button {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

#mobile-refresh-button:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

#mobile-refresh-button:active {
    transform: translateY(0);
}

[data-theme="dark"] #mobile-refresh-button {
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] #mobile-refresh-button:hover {
    background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .tab-content {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tank-info {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .volume-text,
[data-theme="dark"] .temp-text {
    color: #f8fafc;
}

/* Settings Button */
.settings-button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.settings-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.settings-button:active {
    transform: translateY(0);
}

.settings-button i {
    font-size: 1rem;
}

/* Dark mode adjustments */
[data-theme="dark"] .settings-button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

[data-theme="dark"] .settings-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .dashboard-container {
    background: var(--bg-secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Tank Cards */
.tank-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tank-card:hover {
    background: linear-gradient(135deg, 
        rgba(254, 202, 202, 0.8) 0%, 
        rgba(253, 186, 116, 0.8) 100%
    );
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark mode adjustments */
[data-theme="dark"] .tank-card {
    background: var(--bg-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tank-card:hover {
    background: linear-gradient(135deg, 
        rgba(220, 38, 38, 0.2) 0%, 
        rgba(234, 88, 12, 0.2) 100%
    );
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .dashboard-container {
        padding: 0.75rem;
    }
}

/* Temperature Header Styles */
.temperature-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, 
        rgba(241, 245, 249, 0.8) 0%, 
        rgba(226, 232, 240, 0.8) 100%
    );
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.temperature-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.temperature-title i {
    color: #f97316;
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.3));
    opacity: 0.8;
}

.temperature-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin: 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .temperature-header {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.8) 100%
    );
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .temperature-title i {
    color: #f97316;
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.4));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .temperature-header {
        margin-bottom: 1.5rem;
        padding: 0.75rem;
    }

    .temperature-title {
        font-size: 1.2rem;
    }

    .temperature-title i {
        font-size: 0.5rem;
    }

    .temperature-subtitle {
        font-size: 0.9rem;
    }
}

/* Login Screen Styles */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.95) 0%, 
        rgba(15, 23, 42, 0.95) 100%
    );
    z-index: 9999;
}

.login-container {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.login-title i {
    color: #3b82f6;
    font-size: 2.2rem;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.password-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.login-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

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

/* Dark mode adjustments */
[data-theme="dark"] .login-container {
    background: var(--bg-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .password-input input {
    background: var(--bg-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .password-input input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem;
        width: 95%;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-title i {
        font-size: 1.8rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }
}