@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Space+Grotesk:wght@500;700&display=swap');

#menuToggle {
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 22px;
    cursor: pointer;
    z-index: 1001;
}

#sidebarMenu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: #1e1e2f;
    color: white;
    padding-top: 60px;
    transition: 0.3s;
    z-index: 1000;
}

#sidebarMenu ul {
    list-style: none;
    padding: 0;
}

#sidebarMenu li {
    padding: 15px 20px;
    cursor: pointer;
}

#sidebarMenu li:hover {
    background: #333;
}





/* ================= LOGIN PAGE BACKGROUND ================= */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* floating gradient shapes */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.6;
    animation: floatBg 18s ease-in-out infinite alternate;
}

.login-page::before {
    background: #8ec5fc;
    top: -120px;
    left: -120px;
}

.login-page::after {
    background: #e0c3fc;
    bottom: -120px;
    right: -120px;
    animation-delay: 6s;
}

@keyframes floatBg {
    from {
        transform: translateY(0) translateX(0);
    }
    to {
        transform: translateY(-40px) translateX(40px);
    }
}

/* ================= LOGIN CARD ================= */

.login-container {
    width: 360px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    border: 1px solid #e0e6f0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    animation: loginEnter 0.8s cubic-bezier(0.23,1,0.32,1);
    z-index: 2;
}

@keyframes loginEnter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(90deg, #345CFF, #00C4CC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.login-container input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 18px;
    border-radius: 14px;
    border: 1px solid #dce3f0;
    background: #f6f8fc;
    font-size: 1em;
    transition: all 0.3s ease;
}

.login-container input:focus {
    outline: none;
    background: #fff;
    border-color: #345CFF;
    box-shadow: 0 0 0 4px rgba(52, 92, 255, 0.25);
}

.login-container button {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(45deg, #345CFF, #00C4CC);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s ease;
}

.login-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(52, 92, 255, 0.4);
}

/*-----------------------------index css----------------------------*/


.app-logo {
	max-width: 240px;     /* professional header size */
	   display: block;
	   margin: 0 auto;  
}


.heading {
    width: 100%;
    text-align: center;
    margin-top: 0px ;   /* EXACT requirement */
    margin-bottom: 12px; /* small gap before input */
}

:root {
    --color-primary: #345CFF; /* A vibrant yet professional blue */
    --color-secondary: #00C4CC; /* A bright, complementary cyan/teal */
    --color-accent: #FF5C34; /* A warm accent for highlights */
    --color-text-dark: #1A1A2E; /* Dark for strong contrast */
    --color-text-light: #4A4A6A; /* Softer dark for body text */
    --color-background-light: #F0F2F5; /* Light grey background */
    --color-surface-light: #FFFFFF; /* White for cards/containers */
    --color-border: #E0E6F0;
    --shadow-soft: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --glass-effect: rgba(255, 255, 255, 0.85); /* Slightly less opaque for better blur */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-background-light) 0%, #D8E2F2 100%);
    display: flex;
    align-items: flex-start; 
    justify-content: center;
    padding: 20px;
    overflow: auto;
    position: relative;
    color: var(--color-text-light);
	padding-top: 20px; 
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 L 0 10" fill="none" stroke="%23bbdefb" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    background-size: 150px; /* Slightly larger grid for presence */
    opacity: 0.5; /* Increased opacity for more visibility */
    pointer-events: none;
    animation: backgroundMove 120s linear infinite alternate; /* Slower, oscillating animation */
    z-index: 1;
}

@keyframes backgroundMove {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

/* Main Container */
.container {
    background: var(--glass-effect);
    width: 70%;
	padding: 30px; 
    max-width: 900px;
   	padding-top:16px;
    border-radius: 28px;
    box-shadow: 0 25px 80px var(--shadow-strong);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 10;
    animation: slideIn 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
	margin-top: 30px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}



.app-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--color-text-dark);
    font-size: 3.5em;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
}

/* Tagline */
.tagline {
    color: var(--color-text-light);
    font-size: 1.1em;
    margin-top: 8px;
    opacity: 0.8;
}

/* ================= Query Section ================= */
.query-section {
    margin-bottom: 30px;
}

.query-input-container {
    display: flex;
    align-items: center;
    background: var(--color-surface-light);
    border: 2px solid var(--color-border);
    border-radius: 50px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 4px 20px var(--shadow-soft);
    transition: all 0.3s ease;
}

.query-input-container:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 4px 25px rgba(52, 92, 255, 0.15);
}

.query-icon {
    color: var(--color-primary);
    font-size: 1.2em;
    margin-right: 12px;
    opacity: 0.7;
}

.query-input-container input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05em;
    background: transparent;
    color: var(--color-text-dark);
    padding: 12px 0;
}

.query-input-container input::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

.generate-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 92, 255, 0.3);
}

.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(52, 92, 255, 0.4);
}

.generate-btn:active {
    transform: scale(0.95);
}

/* Query Suggestions */
.query-suggestions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-left: 24px;
    flex-wrap: wrap;
}

.suggestion-label {
    font-size: 0.85em;
    color: var(--color-text-light);
    opacity: 0.7;
}

.suggestion-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-light);
    color: var(--color-text-light);
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(52, 92, 255, 0.05);
}

/* ================= Result Actions ================= */
.result-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.feedback-icons {
    display: flex;
    gap: 12px;
}

.feedback-icon {
    font-size: 1.2em;
    color: var(--color-text-light);
    opacity: 0.5;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.feedback-icon:hover {
    opacity: 0.8;
    background: var(--color-background-light);
}

.feedback-icon.active {
    opacity: 1;
}

#likeIcon.active {
    color: #22c55e;
}

#dislikeIcon.active {
    color: #ef4444;
}

.favourite-icon {
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.favourite-icon:hover {
    background: var(--color-background-light);
}

.favourite-icon i {
    font-size: 1.2em;
    color: var(--color-text-light);
    opacity: 0.5;
    transition: all 0.2s ease;
}

.favourite-icon i.favorite-active {
    color: #f59e0b;
    opacity: 1;
}

/* ================= Favourites Button & Panel ================= */
.favourites-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #f59e0b;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.favourites-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: scale(1.05);
}

.favourites-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--color-surface-light);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
    z-index: 100;
    max-height: 350px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.favourites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

.favourites-header span {
    font-weight: 600;
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.favourites-header i {
    color: #f59e0b;
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

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

.favourites-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

.favourite-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--color-border);
}

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

.favourite-item:hover {
    background: var(--color-background-light);
}

.favourite-item-query {
    font-size: 0.95em;
    color: var(--color-text-dark);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favourite-item-icon {
    color: var(--color-primary);
    margin-right: 8px;
    font-size: 0.85em;
}

.no-favourites {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-text-light);
}

.no-favourites i {
    font-size: 2em;
    opacity: 0.3;
    margin-bottom: 10px;
    display: block;
}

.loading-favourites {
    text-align: center;
    padding: 20px;
    color: var(--color-text-light);
}

/* Make query-section relative for panel positioning */
.query-section {
    position: relative;
}

/* Optional: smoother click feel */
.fav-icon:active {
    transform: translateY(-50%) scale(1.15);
}




/* Result Card */
.result-card {
    margin-top: 40px;
    background: var(--glass-effect);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    box-shadow: 0 12px 40px var(--shadow-medium);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.result-card:hover {
    box-shadow: 0 15px 50px var(--shadow-strong);
    transform: translateY(-2px);
}

.result-card #resultSummary {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--color-text-dark);
    margin-bottom: 25px; /* Spacing between description and chart */
}

/* Responsive adjustments for result-card */
@media (max-width: 1024px) {
    .result-card {
        padding: 30px;
    }
    .result-card #resultSummary {
        font-size: 1.05em;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .result-card {
        margin-top: 30px;
        padding: 25px;
        border-radius: 18px;
    }
    .result-card #resultSummary {
        font-size: 1em;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .result-card {
        margin-top: 25px;
        padding: 20px;
        border-radius: 15px;
    }
    .result-card #resultSummary {
        font-size: 0.95em;
        margin-bottom: 15px;
    }
}

/* SQL Output */
pre {
    background: var(--color-background-light);
    padding: 25px;
    border-radius: 16px;
    overflow-x: auto;
    font-size: 1em;
    line-height: 1.8;
    color: var(--color-text-dark);
    border: 1px solid var(--color-border);
    box-shadow: inset 0 2px 10px var(--shadow-soft);
}

/* Ensure sections inside #resultSection are visible when #resultSection is shown */
#resultSection.visible .result-card {
    display: block !important;
}

/* Table */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 750px;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: var(--color-surface-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-soft);
}

th {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: var(--color-surface-light);
    padding: 20px 18px;
    font-weight: 700;
    text-align: left;
    font-size: 1.05em;
    border-bottom: 2px solid var(--color-primary);
}

th:first-child {
    border-top-left-radius: 16px;
}

th:last-child {
    border-top-right-radius: 16px;
}

td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.98em;
    color: var(--color-text-light);
    transition: background-color 0.2s ease, color 0.2s ease;
}

tr:nth-child(even) {
    background: var(--color-background-light);
}

tr:hover td {
    background-color: var(--light-blue);
    color: var(--color-text-dark);
}

tr:last-child td {
    border-bottom: none;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 45px;
    font-size: 0.95em;
    color: var(--color-text-light);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 40px;
    }
    .app-title {
        font-size: 3em;
    }
    .subtitle {
        font-size: 1.2em;
    }
    .input-section {
        padding: 25px;
        gap: 15px;
    }
    .input-section input, .input-section button {
        font-size: 1.05em;
        padding: 16px 25px;
    }
    	.result-card {
            padding: 30px;
        }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    .container {
        padding: 30px;
        border-radius: 20px;
    }
    .app-title {
        font-size: 2.5em;
    }
    .app-title::after {
        bottom: -8px;
        height: 4px;
        width: 60px;
    }
    .subtitle {
        font-size: 1.1em;
        margin-top: 15px;
    }
    .input-section {
        flex-direction: column;
        padding: 20px;
        gap: 12px;
    }
    .input-section input, .input-section button {
        padding: 14px 20px;
        font-size: 1em;
    }
    	.result-card {
            margin-top: 30px;
            padding: 25px;
            border-radius: 18px;
        }
    pre {
        padding: 20px;
        font-size: 0.9em;
    }
    table {
        min-width: 100%;
    }
    th, td {
        padding: 14px 12px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    .app-title {
        font-size: 2em;
    }
    .app-title::after {
        bottom: -6px;
        height: 3px;
        width: 50px;
    }
    .subtitle {
        font-size: 1em;
        margin-top: 10px;
        line-height: 1.5;
    }
    .heading {
        margin-bottom: 30px;
    }
    .input-section {
        padding: 15px;
        gap: 10px;
        margin-bottom: 35px;
    }
    .input-section input, .input-section button {
        padding: 12px 15px;
        font-size: 0.9em;
        border-radius: 12px;
    }


    pre {
        font-size: 0.85em;
        padding: 15px;
    }
    th, td {
        padding: 10px;
        font-size: 0.85em;
    }
}

#chartContainer {
    width: 100%;
    max-width: 100%;
    min-height: 400px; /* allows legend to grow */
    height: auto;       /* IMPORTANT */
    padding: 10px;
    overflow: hidden;   /* prevents overflow */
    display: flex;
    justify-content: center;
    align-items: center;
}

#resultChart {
    width: 100%;
    height: 100%;
}

#resultSection {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.download-btn {
    display: none;
    margin-top: 20px;
    padding: 12px 22px;
    background: var(--color-primary);
    color: var(--color-surface-light);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
}

.download-btn:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 92, 255, 0.3);
}

.view-toggle-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
}

.view-toggle-buttons button {
    padding: 12px 25px;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    background-color: transparent;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.view-toggle-buttons button:hover {
    background-color: rgba(52, 92, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.view-toggle-buttons button.active {
    background: linear-gradient(45deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-surface-light);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(52, 92, 255, 0.3);
    transform: translateY(-1px);
}

.view-toggle-buttons button.active:hover {
    box-shadow: 0 10px 30px rgba(52, 92, 255, 0.4);
    transform: translateY(-2px);
}



/* ================= Favourite Icon ================= */

.input-wrapper {
    flex: 1;                 /* input takes full space */
    position: relative;     /* for absolute icon */
}

.input-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 14px; /* space for heart */
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.fav-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6em;
    color: #bbb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fav-icon:hover {
    color: #ff5c5c;
    transform: translateY(-50%) scale(1.15);
}

.fav-icon.active {
    color: #ff3b3b;
    animation: pop 0.3s ease;
}


.favorite-active {
    color: red;
}


@keyframes pop {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.4); }
    100% { transform: translateY(-50%) scale(1); }
}

/* ================= Loading Animation ================= */
#loadingContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-animation {
    position: relative;
    width: 200px;
    height: 150px;
}

/* File Cabinet */
.file-cabinet {
    position: absolute;
    right: 20px;
    bottom: 0;
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, #5a6c7d, #3d4f5f);
    border-radius: 4px;
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.2);
}

.cabinet-drawer {
    position: absolute;
    left: 5px;
    width: 70px;
    height: 30px;
    background: linear-gradient(135deg, #6b7d8e, #4a5c6d);
    border-radius: 2px;
    border: 1px solid #3d4f5f;
}

.cabinet-drawer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 4px;
    background: #8a9bac;
    border-radius: 2px;
}

.drawer-1 { top: 8px; animation: drawerOpen 2s ease-in-out infinite; }
.drawer-2 { top: 45px; animation: drawerOpen 2s ease-in-out 0.3s infinite; }
.drawer-3 { top: 82px; animation: drawerOpen 2s ease-in-out 0.6s infinite; }

@keyframes drawerOpen {
    0%, 100% { transform: translateX(0); }
    30%, 70% { transform: translateX(15px); }
}

/* Character */
.character {
    position: absolute;
    left: 30px;
    bottom: 0;
}

.character-body {
    width: 40px;
    height: 70px;
    background: linear-gradient(180deg, #345CFF, #00C4CC);
    border-radius: 20px 20px 10px 10px;
    position: relative;
}

.character-body::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 5px;
    width: 30px;
    height: 30px;
    background: #ffd5c8;
    border-radius: 50%;
}

/* Eyes */
.character-body::after {
    content: '';
    position: absolute;
    top: -18px;
    left: 12px;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    box-shadow: 10px 0 0 #333;
}

.character-arm {
    position: absolute;
    top: 15px;
    right: -25px;
    width: 35px;
    height: 10px;
    background: #345CFF;
    border-radius: 5px;
    transform-origin: left center;
    animation: armSearch 2s ease-in-out infinite;
}

@keyframes armSearch {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(20deg); }
}

/* Flying Files */
.files-flying {
    position: absolute;
    top: -20px;
    right: -40px;
}

.file {
    display: block;
    width: 20px;
    height: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    position: absolute;
    animation: fileFly 2s ease-in-out infinite;
}

.file::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 3px;
    width: 14px;
    height: 2px;
    background: #ccc;
    box-shadow: 0 4px 0 #ccc, 0 8px 0 #ccc;
}

.file:nth-child(1) { animation-delay: 0s; }
.file:nth-child(2) { animation-delay: 0.5s; left: 15px; }
.file:nth-child(3) { animation-delay: 1s; left: 30px; }

@keyframes fileFly {
    0% { transform: translateY(50px) rotate(0deg); opacity: 0; }
    50% { transform: translateY(-20px) rotate(15deg); opacity: 1; }
    100% { transform: translateY(50px) rotate(-10deg); opacity: 0; }
}

/* Loading Text */
#loadingContainer .loading-text {
    margin-top: 20px;
    font-size: 1.1em;
    color: var(--color-text-light);
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}


/* ================= ERROR MESSAGES ================= */

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    margin-bottom: 20px;
    animation: errorPulse 2s ease-in-out infinite;
}

.error-icon-general {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.error-icon-busy {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.error-icon-timeout {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4f46e5;
}

.error-icon-network {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.error-icon-sql {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.error-icon-rate {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #ea580c;
}

.error-icon-auth {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #9333ea;
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.error-message {
    font-size: 1.1em;
    color: #475569;
    margin-bottom: 25px;
    max-width: 350px;
    line-height: 1.5;
}

.retry-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #345CFF, #00C4CC);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 92, 255, 0.3);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 92, 255, 0.4);
}

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

