* {
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4285F4;
    --primary-light: #8AB4F8;
    --primary-dark: #1A73E8;
    --secondary: #34A853;
    --accent: #9C27B0;
    --light: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #E8EAED;
    --dark-gray: #5F6368;
    --dark: #202124;
    --success: #34A853;
    --warning: #FBBC05;
    --error: #EA4335;
    --card-bg: #FFFFFF;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --sidebar-width: 250px;
}

body {
    background: var(--light-gray);
    color: var(--dark);
    min-height: 100vh;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar for Desktop */
.sidebar {
    width: var(--sidebar-width);
    background: var(--light);
    color: var(--dark);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--medium-gray);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-icon {
    width: 24px;
    text-align: center;
}

.nav-label {
    font-weight: 500;
}

.nav-badge {
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-bottom: 80px;
    background: var(--light-gray);
}

/* Header */
.header {
    background: var(--light);
    color: var(--dark);
    padding: 1.2rem 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light);
    border-bottom: 1px solid var(--medium-gray);
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    background: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 24px;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    width: 400px;
}

.search-bar:focus-within {
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    color: var(--dark);
}

.search-bar i {
    color: var(--dark-gray);
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.user-action-btn {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--medium-gray);
    padding: 0.7rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-action-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.quick-actions {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 1rem 1.5rem;
    scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
    display: none;
}

.action-btn {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--medium-gray);
    padding: 0.7rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.action-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* Content Pages */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
    padding: 1.5rem;
}

.page.active {
    display: block;
}

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

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.see-all {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.see-all:hover {
    color: var(--primary-dark);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--medium-gray);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--medium-gray);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--secondary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.product-content {
    padding: 1.2rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0.3rem 0;
}

.product-seller {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-bottom: 0.8rem;
}

.seller-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.buy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.buy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Events */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.event-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
}

.event-date {
    background: var(--primary);
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    min-width: 70px;
}

.event-day {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.event-month {
    font-size: 0.8rem;
    opacity: 0.9;
}

.event-details {
    flex: 1;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.event-location {
    font-size: 0.9rem;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.event-time {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

.register-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.register-btn:hover {
    background: #2E8B47;
    transform: translateY(-1px);
}

.register-btn.registered {
    background: var(--dark-gray);
    cursor: not-allowed;
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--medium-gray);
}

.notification-card:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-hover);
}

.notification-card.read {
    opacity: 0.7;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.notification-icon.success {
    background: var(--success);
}

.notification-icon.warning {
    background: var(--warning);
}

.notification-icon.info {
    background: var(--primary);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.notification-message {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--dark-gray);
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--light);
    color: var(--dark);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--medium-gray);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    border: 3px solid var(--medium-gray);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.profile-role {
    color: var(--dark-gray);
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--medium-gray);
}

.stat-item:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: white;
}

.stat-item:hover .stat-value {
    color: white;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.stat-item:hover .stat-label {
    color: white;
}

.profile-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--medium-gray);
}

.menu-item:hover {
    background: var(--primary);
    color: white;
    transform: translateX(3px);
}

.menu-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.menu-item:hover .menu-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

/* Bottom Navigation for Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--light);
    display: none;
    justify-content: space-around;
    padding: 0.7rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-top: 1px solid var(--medium-gray);
}

.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--dark-gray);
    transition: all 0.2s;
    padding: 0.5rem;
    border-radius: 10px;
    min-width: 60px;
    cursor: pointer;
}

.nav-item-mobile.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-icon-mobile {
    font-size: 1.2rem;
}

.nav-label-mobile {
    font-size: 0.65rem;
    font-weight: 500;
}

.nav-badge-mobile {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--light-gray);
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--light);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.form-textarea {
    height: 120px;
    resize: vertical;
}

.btn {
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-block {
    width: 100%;
}

/* Search Results */
.search-results {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-hover);
    display: none;
    position: absolute;
    width: 400px;
    z-index: 101;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--medium-gray);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.8rem;
    border-bottom: 1px solid var(--medium-gray);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--light-gray);
}

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

/* Notes Page */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    text-align: center;
    border: 1px solid var(--medium-gray);
}

.note-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.note-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.note-title {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.note-subject {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.download-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.8rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* My Listings Page */
.listing-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border: 1px solid var(--medium-gray);
}

.listing-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.listing-details {
    flex: 1;
}

.listing-title {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.listing-price {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.listing-status {
    padding: 0.3rem 0.7rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.status-available {
    background: var(--success);
    color: white;
}

.status-sold {
    background: var(--dark-gray);
    color: white;
}

/* Saved Items Page */
.saved-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Help & Support Page */
.help-section {
    margin-bottom: 2rem;
}

.help-item {
    padding: 1.2rem;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--medium-gray);
}

.help-item:hover {
    background: var(--primary);
    color: white;
    transform: translateX(3px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 3000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
}

.toast.show {
    display: block;
    animation: toastSlideUp 0.3s ease;
}

@keyframes toastSlideUp {
    from { bottom: 60px; opacity: 0; }
    to { bottom: 90px; opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 1rem;
    }
    
    .search-bar {
        width: 300px;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .bottom-nav {
        display: flex;
    }
}

@media (max-width: 768px) {
    .search-bar {
        width: 200px;
    }
    
    .products-grid, .notes-grid, .saved-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .events-list {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-menu {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-content {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .search-results {
        width: calc(100% - 2rem);
    }
    
    .products-grid, .notes-grid, .saved-items-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        padding: 1rem;
    }
    
    .page {
        padding: 1rem;
    }
}
