body {
    background: linear-gradient(135deg, #f0f4f8, #e0e7ff);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Typography */
h1.display-4 {
    font-weight: 700;
    color: #0d6efd;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 1.25rem;
    font-weight: 600;
}

/* Gradient headers */
.bg-gradient-primary {
    background: linear-gradient(45deg, #0d6efd, #4e73df);
}

.bg-gradient-info {
    background: linear-gradient(45deg, #17a2b8, #36b9cc);
}

.bg-gradient-success {
    background: linear-gradient(45deg, #28a745, #48bb78);
}

.bg-gradient-warning {
    background: linear-gradient(45deg, #f6c23e, #ffca2c);
}

/* Collapse toggle button */
.collapse-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.collapse-toggle .collapse-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
}

.collapse-toggle[aria-expanded="true"] .collapse-icon {
    content: '−';
}

.collapse-toggle[aria-expanded="false"] .collapse-icon {
    content: '+';
}

.collapse-toggle:hover .collapse-icon {
    background: rgba(255, 255, 255, 0.4);
}

/* Form controls */
.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.3);
}

.form-control-sm {
    padding: 0.4rem 0.75rem;
}

.btn-gradient {
    background: linear-gradient(45deg, #0d6efd, #4e73df);
    border: none;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #4e73df, #0d6efd);
    transform: translateY(-2px);
}

/* Cylinder visualization */
#cylinderContainer {
    position: relative;
    height: 320px;
    margin: 30px auto;
    width: 160px;
}

#cylinder {
    position: absolute;
    width: 160px;
    height: 260px;
    background: linear-gradient(180deg, #e9ecef, #f8f9fa);
    border: 4px solid #4b5e6f;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    top: 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

#gasLevel {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #0d6efd, #4e73df);
    transition: height 1s ease, background-color 0.5s ease;
}

#cylinderBase {
    position: absolute;
    width: 190px;
    height: 25px;
    background: linear-gradient(45deg, #4b5e6f, #6c757d);
    border-radius: 0 0 20px 20px;
    bottom: 0;
    left: -15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#gasPercentage {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #333;
    top: 275px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Pulse animation for low gas */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
.pulse {
    animation: pulse 1.5s infinite;
}

/* Table styles */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Pagination styles */
.pagination {
    margin-top: 1.5rem;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 5px;
    color: #0d6efd;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #0d6efd;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(45deg, #0d6efd, #4e73df);
    border-color: #0d6efd;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Cooking logs date input styles */
#cookingLogsDate {
    max-width: 200px; /* Smaller input width */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cylinderContainer {
        width: 130px;
        height: 280px;
    }
    
    #cylinder {
        width: 130px;
        height: 220px;
    }
    
    #cylinderBase {
        width: 160px;
        left: -15px;
    }
    
    #gasPercentage {
        top: 235px;
        font-size: 22px;
    }

    .pagination {
        font-size: 0.9rem;
    }

    .pagination .page-link {
        padding: 0.4rem 0.65rem;
    }

    #cookingLogsDate {
        max-width: 150px; /* Smaller width on mobile */
    }

    .card {
        margin-bottom: 1.5rem;
    }

    h1.display-4 {
        font-size: 2.5rem;
    }

    

    .collapse-toggle .collapse-icon {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 1rem;
    }

    /* Device status styles */
    #deviceStatus.online {
        color: #28a745;
        font-weight: 600;
    }

    #deviceStatus.offline {
        color: #dc3545;
        font-weight: 600;
    }
}