/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Color Palette */
    --primary-color: #ffffff;
    /* neon white */
    --secondary-color: #b3b3b3;
    /* soft grey for contrast */
    --background-color: #000000;
    /* pure black background */
    --surface-color: #111111;
    /* slightly lighter black for surfaces */
    --text-primary: #ffffff;
    /* white text */
    --text-secondary: #cccccc;
    /* dimmed text */
    --success-color: #39ff14;
    /* neon green */
    --error-color: #ff073a;
    /* neon red */
    --warning-color: #faff00;
    /* neon yellow */
    --border-color: #ffffff;
    /* white borders */

    /* Typography */
    --font-size-xs: 0.8rem;
    --font-size-sm: 0.9rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.2rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.8rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Layout */
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    --box-shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);

    /* Background image setup */
    background-image: url('../images/background.jpg');
    background-size: cover;
    /* Scale image to cover screen */
    background-repeat: no-repeat;
    /* Prevent tiling */
    background-position: center;
    /* Keep it centered */

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== AUTHENTICATION STYLES ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--spacing-md);

    /* Background settings */
    background: url('../images/background.jpg') no-repeat center center;
    background-size: cover;
}


.auth-box {
    display: flex;
    width: 1000px;
    max-width: 95%;
    min-height: 650px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    overflow: hidden;
    padding: 30px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.4);
}

.auth-forms-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.auth-form {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 60px;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(20px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: var(--border-radius);
}

.auth-form.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    flex-shrink: 0;
}

.auth-header h2 {
    color: var(--text-primary);
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-illustration {
    flex: 1;
    background: linear-gradient(135deg, #000000 0%, #00ffff22 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.auth-illustration::before {
    content: '';
    position: absolute;
    inset: 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"><path d="M30,50 Q50,30 70,50 T90,50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
}

.book-icon {
    font-size: 120px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.input-group i:not(.toggle-password) {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.2s ease;
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 12px 0 12px 40px;
    height: 48px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    outline: none;
    border-width: 2px;
    margin-bottom: -1px;
    /* Compensate for the increased border width */
}

.input-group input:focus+i:not(.toggle-password) {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--secondary-color);
    background: rgba(0, 0, 0, 0.03);
}

/* Form Elements */
label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="date"],
select {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background-color: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s;
    box-shadow: none;
    outline: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: none;
}

.form-control {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s;
    box-shadow: none;
    outline: none;
}


/* ===== BUTTON STYLES ===== */
.btn {
    background-color: var(--primary-color);
    color: rgb(10, 10, 10);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.btn-primary {
    background: var(--primary-color);
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    color: black;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 15px;
}

.btn-outline:hover {
    background: rgba(108, 99, 255, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #333;
    color: #ff0000;
    border: 1px solid #ff0000;
}

.btn-secondary:hover {
    background-color: #ff0000;
    color: #333;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    margin: 0;
    font-size: 14px;
}

.btn-signout {
    background-color: transparent;
    border: 2px solid var(--error-color);
    color: var(--error-color);
    padding: 8px 15px;
    font-size: 0.9rem;
    width: auto;
}

.btn-signout:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

/* ===== HEADER STYLES ===== */
header {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: transparent;
    z-index: 100;
}

.header-content {
    display: grid;
    grid-template-columns: minmax(40px, 50px) 1fr minmax(150px, auto);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-md);
    min-height: 70px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.header-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transform: scale(1.5);
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.8);
}

.header-text {
    text-align: left;
    max-width: 100%;
    min-width: 0;
    padding: 0 var(--spacing-sm);
}

header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

header p {
    margin: var(--spacing-xs) 0 0;
    color: var(--text-secondary);
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Account Menu */
.account-menu {
    position: relative;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 200px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
}

.welcome-text {
    font-size: 0.8em;
    color: var(--text-secondary);
    opacity: 0.8;
}

#userName {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.account-icon {
    font-size: 2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.account-info:hover .account-icon {
    transform: scale(1.1);
}

.account-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 10px;
}

.account-info:hover .account-dropdown {
    display: block;
}

.user-email {
    padding: 12px 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.account-dropdown a i {
    width: 16px;
    text-align: center;
}

.account-dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ===== MAIN CONTENT LAYOUT ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    position: relative;

}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(33.33% + 11px);
    /* align with the gap */
    width: 2px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.goals-list {
    background: rgba(0, 0, 0, 0.7);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.history-list {
    background: rgba(0, 0, 0, 0.7);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-bottom: var(--spacing-lg);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.progress-stats {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #222222;
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--spacing-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

/* ===== GOAL CARDS ===== */
.goal-card,
.goal-item {
    background: transparent;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--primary-color);
    animation: fadeIn 0.3s ease-out forwards;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.goal-item:hover {
    transform: translateX(5px);
}

.goal-content {
    flex: 1;
}

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

.goal-subject {
    font-weight: 600;
    color: var(--primary-color);
}

.goal-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.goal-topic {
    font-weight: 500;
    margin-bottom: 5px;
}

.goal-target {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.goal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.complete-btn {
    background: none;
    border: 2px solid var(--success-color);
    color: var(--success-color);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.complete-btn:hover {
    background-color: var(--success-color);
    color: white;
}

.complete-btn.completed {
    background-color: var(--success-color);
    color: white;
}

.edit-btn {
    background-color: var(--warning-color);
    color: #000;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.edit-btn:hover {
    background-color: #e0a800;
}

.delete-btn {
    background-color: var(--error-color);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.completed {
    opacity: 0.7;
    text-decoration: line-through;
}

.no-goals {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px 0;
}

/* ===== CHART STYLES ===== */
.chart-container-wrapper {
    width: 100%;
    margin-bottom: 25px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    transition: all 0.3s ease;
}

.subject-priority-chart {
    background: transparent;
    border-radius: var(--border-radius);
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.chart-header {
    width: 100%;
    margin-bottom: 15px;
    padding: 0 10px;
}

.chart-header h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.chart-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

#subjectPriorityChart {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.chart-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.chart-toggle:hover {
    background-color: var(--secondary-color);
}

/* Chart Legend */
#chartLegend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 10px 0;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    min-width: 160px;
    flex: 1 1 calc(33.333% - 20px);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.legend-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.legend-subject {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-size: 0.95rem;
}

.legend-time {
    font-size: 0.85rem;
    opacity: 0.9;
    white-space: nowrap;
    margin-left: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    padding: 30px 20px;
    gap: 12px;
}

.no-data-message i {
    font-size: 2.5rem;
    opacity: 0.3;
    margin-bottom: 10px;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show,
.modal[style*="display: block"] {
    display: flex !important;
}

.modal-content {
    background-color: var(--surface-color);
    margin: 15% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-btn,
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px 10px;
    line-height: 1;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover,
.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.close-btn:focus,
.close-modal:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-footer .btn {
    margin: 0;
    flex: 1;
}

.modal-body small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.add-goal-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
    color: black;
}

.add-goal-btn i {
    margin-right: 8px;
}

.date-filter {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}


.password-hint,
.forgot-password-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 5px 0 15px 5px;
    line-height: 1.4;
    opacity: 0.8;
}

.forgot-password {
    text-align: right;
    margin-top: 5px;
}

.forgot-password a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--primary-color);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #2d2d3a;
}

.divider:not(:empty)::before {
    margin-right: 10px;
}

.divider:not(:empty)::after {
    margin-left: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== MESSAGE STYLES ===== */
.message,
.auth-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: none;
}

.message.show,
.auth-message.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.message.success,
.auth-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message.error,
.auth-message.error {
    background-color: rgba(255, 107, 107, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

/* ===== ABOUT PAGE STYLES ===== */
.about-section {
    padding: var(--spacing-xl) 0;
    background-color: transparent;
    color: var(--text-primary);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.about-content {
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--box-shadow);
}

.about-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.about-header h1 {
    color: var(--primary-color);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.about-header p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-size: var(--font-size-md);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.about-text h2 {
    color: var(--primary-color);
    margin: var(--spacing-lg) 0 var(--spacing-md);
    font-size: 1.5rem;
}

.about-text h3 {
    color: var(--primary-color);
    margin: var(--spacing-lg) 0 var(--spacing-md);
    font-size: 1.3rem;
}

.about-text p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    color: var(--text-primary);
}

.owner-details {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.contact-info {
    margin-top: var(--spacing-xl);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: var(--spacing-xs) 0;
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.about-image {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    perspective: 1000px;
    animation: float 8s ease-in-out infinite;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ffffff, #e6e6e6, #ffffff);
    border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    z-index: -1;
    opacity: 0.8;
    animation: wave 8s ease-in-out infinite, pulse 6s infinite;
    filter: blur(10px);
    /* soft neon glow */
}

.about-image::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    z-index: -1;
    opacity: 0.5;
    animation: wave 10s ease-in-out infinite reverse;
    filter: blur(6px);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.6);
    /* white neon glow */
    transform: rotateY(5deg);
    transition: all 0.8s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: wave 12s ease-in-out infinite;
    background: #000;
    /* black base for neon */
}

.about-image img:hover {
    transform: rotateY(0) scale(1.05);
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.6);
    animation-play-state: paused;
}



/* ===== FLOATING SHAPES ===== */
.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    animation: float 15s infinite linear;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: -30px;
    animation-duration: 20s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    right: -50px;
    animation-duration: 25s;
    animation-delay: -5s;
}

.shape-3 {
    width: 70px;
    height: 70px;
    top: 70%;
    left: 30%;
    animation-duration: 15s;
    animation-delay: -10s;
    opacity: 0.5;
}

/* ===== SCROLLBAR STYLES ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color);
}

#chartLegend::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    25% {
        transform: translateY(-5px) rotate(1deg);
    }

    50% {
        transform: translateY(-10px) rotate(0);
    }

    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

@keyframes wave {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 50% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 159, 224, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(74, 159, 224, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 159, 224, 0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .header-content {
        grid-template-columns: 40px 1fr auto;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .logo-container {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    header h1 {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
    }

    header p {
        font-size: clamp(0.7rem, 3vw, 0.8rem);
    }

    .legend-item {
        flex: 1 1 calc(50% - 15px);
    }

    .about-grid {
        gap: var(--spacing-lg);
    }

    .about-content {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .header-content {
        grid-template-columns: 36px 1fr auto;
        gap: var(--spacing-sm);
        min-height: 60px;
    }

    .logo-container {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .account-menu {
        max-width: 160px;
    }

    .welcome-message {
        display: none;
    }

    .account-icon {
        font-size: 1.5rem;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .goals-list {
        padding: 15px;
    }

    .chart-container-wrapper {
        order: -1;
    }

    .progress-bar {
        height: 10px;
    }

    .progress-stats {
        font-size: var(--font-size-xs);
    }

    #chartLegend {
        max-height: 150px;
    }

    .legend-item {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .auth-box {
        flex-direction: column;
        max-width: 95%;
        min-height: auto;
    }

    .auth-illustration {
        padding: 30px 20px;
        min-height: 200px;
    }

    .book-icon {
        font-size: 80px;
        margin-bottom: 15px;
    }

    .auth-form {
        padding: 30px 25px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        margin-bottom: var(--spacing-lg);
    }

    .about-image img {
        max-width: 80%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        grid-template-columns: 30px 1fr auto;
        padding: var(--spacing-xs);
    }

    .logo-container {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    header h1 {
        font-size: 1rem;
    }

    header p {
        display: none;
    }

    .account-menu {
        max-width: 40px;
    }

    .account-info {
        gap: 0;
    }

    .legend-item {
        padding: 8px 12px;
    }

    .legend-subject {
        font-size: 0.9rem;
    }

    .legend-time {
        font-size: 0.8rem;
    }

    .about-content {
        padding: var(--spacing-md);
    }

    .about-header h1 {
        font-size: 1.8rem;
    }

    .about-text h2 {
        font-size: 1.3rem;
    }

    .about-image img {
        max-width: 100%;
    }

    .modal-footer .btn {
        flex: 1;
    }
}

@media (min-width: 480px) {
    .modal-footer .btn {
        flex: 0 1 auto;
    }
}
