:root {
            --primary-purple: #8A2BE2;
            --secondary-purple: #9370DB;
            --dark-purple: #4B0082;
            --light-purple: #D8BFD8;
            --accent-blue: #4169E1;
            --accent-pink: #FF1493;
            --success-green: #32CD32;
            --warning-orange: #FFA500;
            --danger-red: #DC143C;
            --bg-dark: #0A0A1A;
            --bg-card: rgba(26, 26, 46, 0.9);
            --text-light: #FFFFFF;
            --text-gray: #B0B0D0;
            --shadow-glow: 0 0 20px rgba(138, 43, 226, 0.5);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--bg-dark);
            color: var(--text-light);
            min-height: 100vh;
            overflow-x: hidden;
            background-image: 
                radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 20%),
                radial-gradient(circle at 90% 80%, rgba(65, 105, 225, 0.15) 0%, transparent 20%);
        }

        /* Navigation */
        .navbar {
            background: rgba(10, 10, 26, 0.95);
            backdrop-filter: blur(10px);
            border-bottom: 2px solid var(--primary-purple);
            padding: 1rem 2rem;
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 1000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        }

        .hamburger-menu {
            cursor: pointer;
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .hamburger-menu span {
            width: 25px;
            height: 3px;
            background: var(--primary-purple);
            display: block;
            transition: 0.3s;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo h1 {
            background: linear-gradient(45deg, var(--primary-purple), var(--accent-blue));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 1.8rem;
            font-weight: 800;
        }

        .nav-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .notification-icon {
            position: relative;
            cursor: pointer;
            font-size: 1.2rem;
        }

        .notification-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background: var(--danger-red);
            color: white;
            font-size: 0.7rem;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-avatar {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: 2px solid var(--primary-purple);
            cursor: pointer;
            background: linear-gradient(45deg, var(--primary-purple), var(--accent-blue));
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            left: -300px;
            top: 0;
            width: 280px;
            height: 100vh;
            background: var(--bg-card);
            backdrop-filter: blur(15px);
            border-right: 2px solid var(--primary-purple);
            padding: 20px;
            transition: left 0.3s ease;
            z-index: 999;
            overflow-y: auto;
        }

        .sidebar.active {
            left: 0;
        }

        .user-info {
            text-align: center;
            padding-bottom: 20px;
            margin-bottom: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .user-info h3 {
            margin: 10px 0 5px;
            color: var(--text-light);
        }

        .user-tag {
            color: var(--text-gray);
            font-size: 0.9rem;
        }

        .menu-items {
            list-style: none;
        }

        .menu-items li {
            margin: 10px 0;
        }

        .menu-items a {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            color: var(--text-light);
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.3s;
        }

        .menu-items a:hover {
            background: rgba(138, 43, 226, 0.2);
            transform: translateX(5px);
        }

        .menu-items i {
            width: 25px;
            margin-right: 10px;
            color: var(--primary-purple);
        }

        .menu-badge {
            background: var(--danger-red);
            color: white;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 0.8rem;
            margin-left: auto;
        }

        /* Main Content */
        .main-content {
            padding: 80px 20px 30px;
            transition: margin-left 0.3s;
        }

        .main-content.sidebar-open {
            margin-left: 280px;
        }

        .page {
            display: none;
            animation: fadeIn 0.5s;
        }

        .page.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Page Headers */
        .page-header {
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--primary-purple);
        }

        .page-header h2 {
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text-light);
        }

        /* AI Chat Section */
        .ai-section {
            background: var(--bg-card);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid var(--primary-purple);
            box-shadow: var(--shadow-glow);
        }

        .ai-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .ai-selector {
            display: flex;
            gap: 10px;
            background: rgba(255, 255, 255, 0.1);
            padding: 5px;
            border-radius: 10px;
        }

        .ai-btn {
            padding: 8px 15px;
            border: none;
            background: transparent;
            color: var(--text-gray);
            border-radius: 8px;
            cursor: pointer;
        }

        .ai-btn.active {
            background: var(--primary-purple);
            color: white;
        }

        .ai-chat-container {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            padding: 20px;
        }

        .chat-messages {
            height: 250px;
            overflow-y: auto;
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
        }

        .message {
            margin-bottom: 15px;
            padding: 10px;
            border-radius: 10px;
            max-width: 80%;
        }

        .ai-message {
            background: rgba(138, 43, 226, 0.2);
            border-left: 3px solid var(--primary-purple);
        }

        .user-message {
            background: rgba(65, 105, 225, 0.2);
            border-left: 3px solid var(--accent-blue);
            margin-left: auto;
        }

        .chat-input {
            display: flex;
            gap: 10px;
        }

        .chat-input input {
            flex: 1;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid var(--primary-purple);
            border-radius: 10px;
            color: white;
        }

        .chat-input button {
            padding: 12px 20px;
            background: var(--primary-purple);
            border: none;
            border-radius: 10px;
            color: white;
            cursor: pointer;
        }

        .voice-btn {
            background: var(--accent-pink) !important;
        }

        /* Dashboard Grid */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .dashboard-card {
            background: var(--bg-card);
            border-radius: 15px;
            padding: 20px;
            border: 1px solid rgba(138, 43, 226, 0.3);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        /* Login Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--bg-dark);
            border-radius: 15px;
            width: 90%;
            max-width: 400px;
            padding: 30px;
            border: 2px solid var(--primary-purple);
            position: relative;
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--primary-purple);
            border-radius: 8px;
            color: white;
            margin-top: 5px;
        }

        .submit-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(45deg, var(--primary-purple), var(--accent-blue));
            border: none;
            border-radius: 8px;
            color: white;
            font-weight: bold;
            cursor: pointer;
        }

        /* Cards and Lists */
        .challenge-item, .friend-item, .badge-item {
            display: flex;
            align-items: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            margin-bottom: 10px;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat-item {
            text-align: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }

        .stat-value {
            font-size: 24px;
            font-weight: bold;
            color: var(--primary-purple);
            margin-bottom: 5px;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .sidebar {
                width: 250px;
            }
            
            .main-content.sidebar-open {
                margin-left: 250px;
            }
            
            .dashboard-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Overlay for sidebar */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 998;
        }

        .sidebar-overlay.active {
            display: block;
        }