* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom scrollbar for the entire page */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0f0f23;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 6px;
    border: 2px solid #0f0f23;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1e1e2e 0%, #2d2d44 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
}

.sidebar-header h2 {
    color: #e2e8f0;
    font-size: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header h2 {
    font-size: 0;
}

.sidebar-header i {
    color: #6366f1;
    margin-right: 10px;
}

.sidebar.collapsed .sidebar-header i {
    margin-right: 0;
    font-size: 1.5rem;
}

.sidebar-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-nav {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    margin: 5px 20px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar.collapsed .nav-item a {
    padding: 15px 10px;
    justify-content: center;
}

.nav-item a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #e2e8f0;
    transform: translateX(5px);
}

.sidebar.collapsed .nav-item a:hover {
    transform: none;
}

.nav-item.active a {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    color: #94a3b8;
    margin-bottom: 15px;
    overflow: hidden;
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

.user-info i {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #6366f1;
    flex-shrink: 0;
}

.sidebar.collapsed .user-info i {
    margin-right: 0;
}

.logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .logout-btn {
    padding: 10px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.logout-btn i {
    margin-right: 8px;
    flex-shrink: 0;
}

.sidebar.collapsed .logout-btn i {
    margin-right: 0;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
}

.content-header {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 20px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
}

.content-header h1 {
    color: #e2e8f0;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 0 30px 30px;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-header h2 {
    color: #e2e8f0;
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header h2 i {
    margin-right: 15px;
    color: #6366f1;
}

.section-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.card-content h3 {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.card-value {
    color: #6366f1;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-content p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

.quick-actions {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.quick-actions h3 {
    color: #e2e8f0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.action-btn i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Timer Section Styles */
.timer-container {
    max-width: 800px;
    margin: 0 auto;
}

.timer-display {
    margin: 40px 0;
    text-align: center;
}

.timer-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3), 0 0 50px rgba(99, 102, 241, 0.1);
    position: relative;
}

.timer-circle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    z-index: -1;
    opacity: 0.2;
}

.timer-time {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.timer-phase {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.btn-timer {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-start {
    background: #10b981;
    color: white;
}

.btn-start:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-pause {
    background: #f59e0b;
    color: white;
}

.btn-pause:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-reset {
    background: #6b7280;
    color: white;
}

.btn-reset:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.btn-timer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.timer-settings {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin: 40px 0;
}

.timer-settings h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.3rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.setting-group {
    text-align: center;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 1rem;
}

.setting-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #374151;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: #1f1f2e;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.setting-group input:focus {
    border-color: #6366f1;
    outline: none;
    background: #2a2a3e;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.timer-progress {
    margin: 40px 0;
}

.progress-container {
    max-width: 500px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #374151;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.session-count {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

/* Timer states */
.timer-circle.work {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.timer-circle.break {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.timer-circle.long-break {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Modern Timer Styles */
.modern-timer {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.timer-subject-selector {
    margin-bottom: 40px;
}

.timer-subject-selector label {
    display: block;
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.timer-subject-selector select {
    background: rgba(30, 30, 46, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
    min-width: 200px;
    outline: none;
    transition: all 0.3s ease;
}

.timer-subject-selector select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.timer-display-modern {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.timer-circle-modern {
    position: relative;
    display: inline-block;
}

.timer-progress-ring {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.timer-progress-ring-progress {
    transition: stroke-dashoffset 1s linear;
    stroke-linecap: round;
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-time-modern {
    font-size: 3.5rem;
    font-weight: 300;
    color: #e2e8f0;
    margin-bottom: 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.timer-phase-modern {
    font-size: 1.2rem;
    color: #6366f1;
    font-weight: 500;
    margin-bottom: 4px;
}

.timer-session-info {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 400;
}

.timer-controls-modern {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.btn-timer-modern {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-timer-modern.btn-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-timer-modern.btn-start:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-timer-modern.btn-pause {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-timer-modern.btn-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4);
}

.btn-timer-modern.btn-reset {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.btn-timer-modern.btn-reset:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
}

.btn-timer-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.timer-settings-modern {
    background: rgba(30, 30, 46, 0.5);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.timer-settings-modern h3 {
    color: #e2e8f0;
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-align: center;
}

.settings-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setting-item {
    text-align: center;
}

.setting-item label {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.setting-input input {
    background: rgba(15, 15, 35, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: 12px;
    width: 80px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.setting-input input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.setting-input span {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Subjects Section Styles */
.subjects-container {
    max-width: 1200px;
    margin: 0 auto;
}

.add-subject-form {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 40px;
}

.add-subject-form h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.subject-card {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.subject-name {
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.subject-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.subject-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.subject-progress {
    margin-bottom: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

.progress-percentage {
    color: #6366f1;
    font-weight: 600;
}

.progress-bar-subject {
    width: 100%;
    height: 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-subject {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.subject-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #94a3b8;
}

.no-subjects {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px 20px;
}

/* Room Interface Styles */
.room-action-bar {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 30px;
}

.room-action-selector {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 25px;
    background: rgba(15, 15, 35, 0.5);
    border-radius: 12px;
    padding: 4px;
}

.room-action-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.room-action-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.room-form {
    display: none;
}

.room-form.active {
    display: block;
}

.join-form .form-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.join-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    background: rgba(15, 15, 35, 0.8);
    color: #e2e8f0;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.join-form input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.join-form button {
    padding: 15px 20px;
    border-radius: 12px;
}

.create-form .form-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.create-form .form-group {
    flex: 1;
}

.create-form input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    background: rgba(15, 15, 35, 0.8);
    color: #e2e8f0;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.create-form input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.create-form button {
    padding: 15px 25px;
    border-radius: 12px;
    white-space: nowrap;
}

.room-interface {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(15, 15, 35, 0.3);
}

.room-info h3 {
    color: #e2e8f0;
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.room-code {
    color: #94a3b8;
    font-size: 0.9rem;
}

.room-timer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.small-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 15, 35, 0.5);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #e2e8f0;
    font-weight: 600;
    min-width: 50px;
}

.timer-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.timer-btn:hover {
    transform: scale(1.1);
}

.timer-btn.paused {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.timer-subject {
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
}

.leave-room-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leave-room-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.room-members {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.room-members h4 {
    color: #e2e8f0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.member-tag {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.member-status.idle {
    background: #94a3b8;
}

.room-chat {
    height: 400px;
    display: flex;
    flex-direction: column;
}

/* Messenger-style Chat Interface */
.chat-messages.messenger-style {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.chat-message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-header.own {
    flex-direction: row-reverse;
}

.message-sender {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.message-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.message-bubble {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 12px 16px;
    border-radius: 18px;
    color: #e2e8f0;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

.chat-message.own .message-bubble {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
}

.message-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid rgba(99, 102, 241, 0.1);
    border-bottom: 8px solid rgba(99, 102, 241, 0.1);
}

.chat-message.own .message-bubble::before {
    left: auto;
    right: -8px;
    border-left: 8px solid #6366f1;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #6366f1;
}

.chat-form.messenger-style {
    padding: 20px;
    background: rgba(15, 15, 35, 0.3);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.chat-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-container input {
    flex: 1;
    background: rgba(15, 15, 35, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    padding: 12px 18px;
    border-radius: 25px;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chat-input-container input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-send-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* System Messages */
.chat-message.system {
    justify-content: center;
    margin: 20px 0;
}

.system-message {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #94a3b8;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: fit-content;
}

.system-message i {
    color: #6366f1;
}

/* Auth Styles */
.auth-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-loading {
    display: none;
    text-align: center;
    margin-top: 15px;
    color: #6366f1;
}

.auth-loading.active {
    display: block;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content-header {
        padding: 15px 20px;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 0 20px 30px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .timer-display-modern {
        margin-bottom: 30px;
    }
    
    .timer-progress-ring {
        width: 250px;
        height: 250px;
    }
    
    .timer-progress-ring circle {
        r: 115;
        cx: 125;
        cy: 125;
    }
    
    .timer-time-modern {
        font-size: 2.5rem;
    }
    
    .timer-controls-modern {
        gap: 15px;
        margin-bottom: 40px;
    }
    
    .btn-timer-modern {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .settings-grid-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .create-form .form-row {
        flex-direction: column;
    }
    
    .room-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .room-timer {
        justify-content: space-between;
    }
    
    .room-chat {
        height: 350px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .auth-container {
        margin: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .content-header {
        padding: 15px;
    }
    
    .content-section {
        padding: 0 15px 30px;
    }
    
    .timer-progress-ring {
        width: 200px;
        height: 200px;
    }
    
    .timer-progress-ring circle {
        r: 90;
        cx: 100;
        cy: 100;
    }
    
    .timer-time-modern {
        font-size: 2rem;
    }
    
    .timer-phase-modern {
        font-size: 1rem;
    }
    
    .btn-timer-modern {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .room-interface {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .room-action-bar {
        margin: 0 -15px 20px;
        border-radius: 0;
    }
}

/* Desktop Sidebar Collapse */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: block;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 70px;
    }
}

/* Sessions Section Styles */
.sessions-container {
    max-width: 1000px;
    margin: 0 auto;
}

.add-session-form {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 30px;
}

.add-session-form h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #cbd5e1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #374151;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #1f1f2e;
    color: #e2e8f0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #2a2a3e;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.today-summary {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.today-summary h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #2d2d44 0%, #1e1e2e 100%);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #6366f1;
    margin-bottom: 8px;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Rooms Section Styles */
.rooms-container {
    max-width: 1200px;
    margin: 0 auto;
}

.room-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .room-actions {
        grid-template-columns: 1fr;
    }
}

.room-creation, .room-joining {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.room-creation h3, .room-joining h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-creation h3 i, .room-joining h3 i {
    color: #6366f1;
}

.active-rooms {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 30px;
}

.active-rooms h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.active-rooms h3 i {
    color: #6366f1;
}

.rooms-list {
    max-height: 400px;
    overflow-y: auto;
}

.room-item {
    background: linear-gradient(135deg, #2d2d44 0%, #1e1e2e 100%);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.room-item:hover {
    background: linear-gradient(135deg, #3d3d54 0%, #2e2e3e 100%);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.room-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.room-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1.1rem;
}

.room-code {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.room-members-count {
    color: #94a3b8;
    font-size: 0.9rem;
}

.no-rooms {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px 20px;
}

.current-room {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-top: 30px;
}

.current-room h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    padding-bottom: 15px;
}

.room-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.room-info p {
    color: #cbd5e1;
    margin: 0;
    font-size: 1rem;
}

.room-info strong {
    color: #6366f1;
}

.room-members {
    margin-bottom: 30px;
}

.room-members h4 {
    color: #e2e8f0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.member-tag {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.room-chat {
    margin-bottom: 30px;
}

.room-chat h4 {
    color: #e2e8f0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    background: #1f1f2e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #374151;
}

.chat-message {
    margin-bottom: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #2d2d44 0%, #1e1e2e 100%);
    border-radius: 10px;
    border-left: 4px solid #6366f1;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.chat-username {
    font-weight: 600;
    color: #6366f1;
    font-size: 0.9rem;
}

.chat-timestamp {
    color: #94a3b8;
    font-size: 0.8rem;
}

.chat-content {
    color: #e2e8f0;
    font-size: 0.95rem;
}

.chat-form {
    display: flex;
    gap: 15px;
}

.chat-form input {
    flex: 1;
    margin: 0;
}

.chat-form button {
    width: auto;
    padding: 15px 25px;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.5);
}

/* History Section Styles */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
}

.history-filters {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 30px;
}

.history-filters h3 {
    color: #e2e8f0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.filter-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 12px 16px;
    border: 2px solid #374151;
    border-radius: 8px;
    background: #1f1f2e;
    color: #e2e8f0;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-options select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.sessions-history {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.sessions-history h3 {
    color: #e2e8f0;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.sessions-list {
    max-height: 500px;
    overflow-y: auto;
}

.session-item {
    background: linear-gradient(135deg, #2d2d44 0%, #1e1e2e 100%);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    border-left: 4px solid #6366f1;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.session-item:hover {
    background: linear-gradient(135deg, #3d3d54 0%, #2e2e3e 100%);
    transform: translateX(5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.session-subject {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1.2rem;
}

.session-time {
    color: #94a3b8;
    font-size: 0.9rem;
}

.session-duration {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.session-notes {
    color: #cbd5e1;
    font-style: italic;
    margin-top: 15px;
    line-height: 1.5;
}

.no-sessions {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 60px 20px;
    font-size: 1.1rem;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Scrollbar styling */
.sessions-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.rooms-list::-webkit-scrollbar {
    width: 8px;
}

.sessions-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.rooms-list::-webkit-scrollbar-track {
    background: #1f1f2e;
    border-radius: 4px;
}

.sessions-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.rooms-list::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
}

.sessions-list::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.rooms-list::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}





/* MQTT Connection Status */
.mqtt-status {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mqtt-connected {
    background: #10b981;
    color: white;
}

.mqtt-disconnected {
    background: #ef4444;
    color: white;
}

.mqtt-connecting {
    background: #f59e0b;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Notification styles */
.notification {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.notification.success {
    background: #10b981 !important;
}

.notification.error {
    background: #ef4444 !important;
}

.notification.warning {
    background: #f59e0b !important;
}

.notification.info {
    background: #6366f1 !important;
}

/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.auth-container {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 450px;
    position: relative;
    backdrop-filter: blur(10px);
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.auth-modal.active .auth-container {
    transform: translateY(0);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h1 {
    color: #e2e8f0;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.auth-header h1 i {
    color: #6366f1;
    margin-right: 15px;
}

.auth-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 20px;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.auth-tab:hover:not(.active) {
    background: rgba(99, 102, 241, 0.1);
    color: #e2e8f0;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form .form-group {
    margin-bottom: 25px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.auth-form .form-group input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #374151;
    border-radius: 10px;
    font-size: 16px;
    background: #1f1f2e;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: #2a2a3e;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-form .form-group input::placeholder {
    color: #6b7280;
}

.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.auth-loading {
    display: none;
    text-align: center;
    margin-top: 20px;
    color: #6366f1;
    font-weight: 500;
}

.auth-loading.active {
    display: block;
}

.auth-loading i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Hide main content when auth modal is active */
body.auth-active .sidebar,
body.auth-active .main-content {
    filter: blur(5px);
    pointer-events: none;
}

/* Responsive auth modal */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 30px 25px;
        max-width: none;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .auth-tabs {
        margin-bottom: 25px;
    }
    
    .auth-tab {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}
