/* Mobile-First Responsive Design */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    color: #1a365d;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #1976d2;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(25, 118, 210, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #e3f2fd;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.4em;
    font-weight: 700;
    color: #1976d2;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

/* Logo image styling */
.logo img,
img.logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* Dashboard Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
    border-bottom: 1px solid #e3f2fd;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    margin: 0;
    font-size: 1.3em;
    color: #1976d2;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sidebar-toggle {
    background: #1976d2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    display: block;
    z-index: 1002;
    position: relative;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.sidebar-toggle:hover {
    background: #1565c0;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.4);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.user-info {
    color: #1a365d;
    font-weight: 500;
}

.logout-btn {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

/* Dashboard Layout */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8faff;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.content.sidebar-hidden {
    margin-left: 0;
}

.content.sidebar-collapsed {
    margin-left: 0;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

/* Desktop-specific sidebar states */
@media (min-width: 769px) {
    .sidebar.hidden + .sidebar-overlay {
        display: none !important;
    }
    
    .content {
        transition: margin-left 0.3s ease, padding 0.3s ease;
    }
    
    .content.sidebar-hidden {
        padding-left: 30px; /* Extra padding when sidebar is hidden */
    }
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8faff;
}

.navbar nav a {
    margin-left: 32px;
    text-decoration: none;
    color: #1a365d;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 6px;
}

.navbar nav a:hover {
    color: #1976d2;
    background: rgba(25, 118, 210, 0.1);
    transform: translateY(-1px);
}

.hero {
    max-width: 600px;
    margin: 60px auto 40px auto;
    text-align: center;
    padding: 40px 24px 32px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
    border: 1px solid #e3f2fd;
}

.hero h1 {
    font-size: 2.7em;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1976d2;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

.subtitle {
    font-size: 1.2em;
    color: #2c5282;
    margin-bottom: 32px;
}


.form-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
    border: 1px solid #e3f2fd;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1976d2;
    font-size: 1.8em;
    font-weight: 600;
}

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

.form-container label {
    display: block;
    margin-bottom: 8px;
    color: #2c5282;
    font-weight: 500;
}

.form-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    font-size: 1em;
    background: #f8faff;
    color: #1a365d;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-container input:focus {
    border: 2px solid #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-container button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.form-container button:hover {
    background: linear-gradient(135deg, #1565c0 0%, #2196f3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.form-container .form-link {
    text-align: center;
    margin-top: 20px;
}

.form-container .form-link a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.form-container .form-link a:hover {
    color: #1565c0;
    text-decoration: underline;
}


.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin: 60px auto 0 auto;
    max-width: 900px;
    padding: 0 16px 40px 16px;
}

.feature {
    flex: 1 1 260px;
    min-width: 220px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    padding: 28px 22px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
    text-align: center;
    border: 1px solid #e3f2fd;
}

.feature h2 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 1.2em;
}

footer {
    text-align: center;
    padding: 32px 0 18px 0;
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
    color: #2c5282;
    font-size: 1em;
    margin-top: 40px;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    height: calc(100vh - 96px);
    background: linear-gradient(135deg, #f8faff 0%, #e3f2fd 100%);
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white !important;
    padding: 20px;
    box-shadow: 2px 0 8px rgba(25, 118, 210, 0.2);
    overflow-y: auto;
    height: calc(100vh - 96px);
    position: fixed;
    left: 0;
    top: 96px;
    z-index: 999;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    position: relative;
}

.sidebar-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.3s ease;
    display: block;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Ensure sidebar text is always visible */
.sidebar * {
    color: inherit !important;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: #1a365d !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-weight: 700 !important;
}

.sidebar ul li {
    margin-bottom: 10px;
    color: #2c5282 !important;
}

.sidebar ul li a {
    color: #1a365d !important;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 6px;
    display: block;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #1976d2 !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Collapsible Analytics Groups */
.analytics-group {
    margin-bottom: 5px;
}

.analytics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.analytics-header:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(3px);
}

.group-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.group-title {
    flex-grow: 1;
    color: #e3f2fd !important;
    font-weight: 500;
    font-size: 0.9em;
}

.collapse-icon {
    color: #e3f2fd !important;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.collapse-icon.expanded {
    transform: rotate(180deg);
}

.analytics-tools {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.analytics-tools li {
    margin: 0 !important;
}

.analytics-tools a {
    display: block !important;
    padding: 10px 20px !important;
    margin: 2px 0 !important;
    color: #1a365d !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    border-left: 3px solid transparent !important;
    transition: all 0.3s ease !important;
    font-size: 0.9em !important;
    position: relative;
}

.analytics-tools a:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-left-color: #42a5f5 !important;
    color: #1976d2 !important;
    transform: translateX(3px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.workspace {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
}

.workspace h2 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 1.8em;
}

/* Dashboard Upload Section */
.upload-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e3f2fd;
}

.upload-section h3 {
    margin-top: 0;
    color: #1976d2;
    font-size: 1.3em;
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.file-input-container input[type="file"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    background: #f8faff;
    color: #1a365d;
    transition: all 0.3s;
}

.file-input-container input[type="file"]:focus {
    border: 2px solid #1976d2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.file-input-container button {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.file-input-container button:hover {
    background: linear-gradient(135deg, #1565c0 0%, #2196f3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.file-info {
    font-size: 0.9em;
    color: #2c5282;
    margin: 0;
}

/* Sample Datasets Section */
.sample-datasets {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.sample-datasets h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-weight: 600;
}

.sample-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sample-btn {
    background: linear-gradient(135deg, #f8faff 0%, #e3f2fd 100%);
    border: 2px solid #bbdefb;
    border-radius: 10px;
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
}

.sample-btn:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #1976d2;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.2);
}

.sample-btn strong {
    color: #1976d2;
    font-size: 1em;
    display: block;
    margin-bottom: 8px;
}

.sample-btn small {
    color: #2c5282;
    font-size: 0.85em;
    line-height: 1.2;
}

/* Analytics Section */
.analytics-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #e3f2fd;
}

.panel-button {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.3);
    transition: all 0.3s;
}

.panel-button:hover {
    background: linear-gradient(135deg, #1565c0 0%, #2196f3 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(25, 118, 210, 0.4);
}

/* Files Section */
.files-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
    border: 1px solid #e3f2fd;
}

/* Analytics Examples Section */
.analytics-examples {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
    border: 1px solid #e3f2fd;
    margin-bottom: 30px;
}

.analytics-examples h3 {
    margin-top: 0;
    color: #1976d2;
    font-size: 1.4em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.example-card {
    background: linear-gradient(135deg, #f8faff 0%, #e8f5e8 100%);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #c8e6c9;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
    border-color: #81c784;
}

.example-card h4 {
    margin: 0 0 15px 0;
    color: #1b5e20;
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 2px solid #c8e6c9;
    padding-bottom: 8px;
}

.example-card p {
    margin: 0 0 12px 0;
    color: #2e7d32;
    line-height: 1.4;
}

.example-card ul {
    margin: 15px 0;
    padding-left: 20px;
    color: #388e3c;
}

.example-card li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.example-card strong {
    color: #1b5e20;
    font-weight: 600;
}

.example-card em {
    display: block;
    margin-top: 15px;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4caf50;
    border-radius: 4px;
    color: #1b5e20;
    font-style: normal;
    font-weight: 500;
    font-size: 0.9em;
}

.getting-started {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #bbdefb;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.getting-started h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 1.2em;
    font-weight: 600;
}

.getting-started ol {
    margin: 0;
    padding-left: 20px;
    color: #1565c0;
}

.getting-started li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.getting-started strong {
    color: #0d47a1;
}

.files-section h3 {
    margin-top: 0;
    color: #1976d2;
    font-size: 1.3em;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: linear-gradient(135deg, #f8faff 0%, #e3f2fd 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #bbdefb;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
    transition: all 0.3s;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.15);
}

.file-card h4 {
    margin: 0 0 12px 0;
    color: #1976d2;
    font-size: 1.1em;
    font-weight: 600;
}

.file-card p {
    margin: 6px 0;
    color: #2c5282;
    font-size: 0.9em;
}

.file-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-view, .btn-delete {
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-view {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.btn-view:hover {
    background: linear-gradient(135deg, #1565c0 0%, #2196f3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    box-shadow: 0 2px 8px rgba(21, 87, 36, 0.1);
}

/* Sliding Panel */
.sliding-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white !important;
    padding: 30px;
    box-shadow: -4px 0 20px rgba(25, 118, 210, 0.3);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

/* Ensure sliding panel text is always visible */
.sliding-panel * {
    color: inherit !important;
}

.sliding-panel.open {
    right: 0;
}

.sliding-panel h3 {
    color: #1a365d !important;
    margin-bottom: 20px;
    font-size: 1.4em;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 15px !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: 700 !important;
}

.sliding-panel p {
    color: #2c5282 !important;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

.sliding-panel ul {
    list-style: none;
    padding: 0;
}

.sliding-panel ul li {
    color: #1a365d !important;
    padding: 12px 15px;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 6px !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.sliding-panel ul li:last-child {
    border-bottom: none;
}

.sliding-panel #close-panel {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a365d !important;
    border: 2px solid #1976d2 !important;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.sliding-panel #close-panel:hover {
    background: #ffffff !important;
    color: #1976d2 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.sliding-panel .panel-button {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a365d !important;
    border: 2px solid #1976d2 !important;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.sliding-panel .panel-button:hover {
    background: #ffffff !important;
    color: #1976d2 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Force visibility for sidebar and sliding panel text */
.sidebar h3,
.sidebar ul,
.sidebar ul li,
.sidebar ul li a,
.sliding-panel h3,
.sliding-panel p,
.sliding-panel ul,
.sliding-panel ul li {
    color: #1a365d !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    font-weight: 600 !important;
}

.sidebar ul li a {
    color: #2c5282 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.sliding-panel ul li {
    color: #1a365d !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 4px !important;
    margin-bottom: 5px !important;
    padding: 10px !important;
}

.sliding-panel p {
    color: #2c5282 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 4px !important;
    padding: 10px !important;
}

.dashboard {
    display: flex;
    height: calc(100vh - 80px);
}
.workspace {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.sliding-panel {
    width: 260px;
    background: #fafafa;
    border-left: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.sliding-panel.open {
    transform: translateX(0);
}
.panel-button {
    margin-bottom: 12px;
    padding: 8px 14px;
    background: #008080;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* Advanced Visualization Styles */
.visualization-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.control-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    color: #495057;
}

.form-group select:focus, .form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.generate-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chart-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-button:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.chart-content {
    display: none;
    min-height: 400px;
}

.chart-content.active {
    display: block;
}

.matplotlib-chart {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.matplotlib-chart img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

.d3-chart {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.d3-chart svg {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

.chart-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    color: #1565c0;
    font-weight: 500;
}

.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    color: #c62828;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.axis {
    font-size: 12px;
    color: #495057;
}

.axis-label {
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
}

.tooltip {
    position: absolute;
    padding: 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    pointer-events: none;
    font-size: 12px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend {
    font-size: 12px;
    color: #495057;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* D3.js specific styling */
.d3-chart .bar {
    fill: steelblue;
    transition: fill 0.3s ease;
}

.d3-chart .bar:hover {
    fill: #667eea;
}

.d3-chart .dot {
    transition: r 0.3s ease, fill 0.3s ease;
}

.d3-chart .dot:hover {
    r: 6;
}

.d3-chart .cell {
    transition: stroke-width 0.3s ease;
}

.d3-chart .cell:hover {
    stroke: #333;
    stroke-width: 2px;
}

/* Responsive design for visualizations */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: auto;
    }
    
    .chart-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-button.active {
        border-right-color: #667eea;
        border-bottom-color: transparent;
    }
    
    .matplotlib-chart, .d3-chart {
        padding: 15px;
        margin: 15px 0;
    }
    
    .visualization-container {
        padding: 20px;
        margin: 15px 0;
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar {
        padding: 12px 16px;
    }
    
    .navbar nav {
        display: none;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .navbar nav.mobile-visible {
        display: flex;
    }
    
    .navbar nav a {
        padding: 10px 15px;
        width: 100%;
        text-align: center;
        border-radius: 6px;
        background: rgba(25, 118, 210, 0.1);
    }
    
    .logo {
        font-size: 1.2em;
    }
    
    .logo img {
        height: 32px;
    }
}

/* Mobile Dashboard */
@media (max-width: 768px) {
    .header {
        padding: 10px 16px;
    }
    
    .header-left h1 {
        font-size: 1.1em;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .sidebar-toggle {
        display: block;
        order: -1;
        margin-right: 10px;
    }
    
    .sidebar {
        width: 100%;
        max-width: 320px;
        transform: translateX(-100%);
        top: 0;
        height: 100vh;
        z-index: 1001;
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .content {
        margin-left: 0;
        padding: 15px;
    }
    
    .main-content {
        overflow: visible;
    }
    
    .user-info {
        display: none;
    }
}

/* Mobile Forms */
@media (max-width: 768px) {
    .form-container {
        margin: 20px auto;
        padding: 25px 20px;
        max-width: 95%;
    }
    
    .hero {
        margin: 20px auto;
        padding: 25px 20px;
        max-width: 95%;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
}

/* Mobile Features */
@media (max-width: 768px) {
    .features {
        flex-direction: column;
        gap: 20px;
        margin: 40px auto 0;
        padding: 0 16px 20px;
    }
    
    .feature {
        min-width: auto;
        padding: 20px 18px;
    }
}

/* Mobile Dashboard Cards */
@media (max-width: 768px) {
    .upload-section,
    .analytics-section,
    .files-section,
    .analytics-examples,
    .visualization-container {
        margin: 15px 0;
        padding: 20px 15px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-view,
    .btn-delete {
        text-align: center;
        width: 100%;
    }
}

/* Mobile Sample Buttons */
@media (max-width: 768px) {
    .sample-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .sample-btn {
        min-width: auto;
        padding: 15px 18px;
        text-align: left;
    }
}

/* Mobile Analytics Tools */
@media (max-width: 768px) {
    .analytics-tools a {
        padding: 12px 16px !important;
        font-size: 0.85em !important;
    }
    
    .analytics-header {
        padding: 10px 12px;
    }
    
    .group-icon {
        font-size: 1em;
    }
}

/* Mobile Flash Messages */
@media (max-width: 768px) {
    .flash-message {
        padding: 12px 16px;
        margin: 10px 16px;
        border-radius: 6px;
        font-size: 0.9em;
    }
}

/* Mobile Pricing Page */
@media (max-width: 768px) {
    .pricing-container {
        padding: 20px 15px;
    }
    
    .pricing-header h1 {
        font-size: 2em;
    }
    
    .pricing-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .pricing-cards {
        flex-direction: column;
        gap: 20px;
    }
    
    .pricing-card {
        max-width: none;
        margin: 0;
    }
}

/* Mobile Advanced Visualization */
@media (max-width: 768px) {
    .control-panel {
        padding: 20px 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: auto;
    }
    
    .chart-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-button.active {
        border-right-color: #667eea;
        border-bottom-color: transparent;
    }
    
    .matplotlib-chart,
    .d3-chart {
        padding: 15px;
        margin: 15px 0;
    }
    
    .back-btn {
        margin: 15px 0;
    }
}

/* Very Small Screens (phones in portrait) */
@media (max-width: 480px) {
    .header-left h1 {
        display: none;
    }
    
    .navbar {
        padding: 10px 12px;
    }
    
    .header {
        padding: 8px 12px;
    }
    
    .content {
        padding: 12px 8px;
    }
    
    .sidebar {
        max-width: 100%;
    }
    
    .form-container,
    .hero {
        padding: 20px 15px;
    }
    
    .hero h1 {
        font-size: 1.8em;
    }
    
    .upload-section,
    .analytics-section,
    .files-section,
    .analytics-examples,
    .visualization-container {
        padding: 15px 12px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 280px;
        max-width: 280px;
    }
    
    .hero {
        margin: 15px auto;
        padding: 20px;
    }
}
