/**
 * WindowEdu Student Habit Tracker
 * Main Stylesheet
 * Version: 1.0
 * Date: April 7, 2025
 */

/* Color Variables */
:root {
    --primary-color: #3377cc;    /* Blue primary */
    --primary-dark: #2255aa;    /* Darker blue */
    --primary-light: #6699ee;   /* Lighter blue */
    --highlight-color: #ffd700; /* Gold highlight */
    --highlight-dark: #ccaa00;  /* Darker gold */
    --neutral-color: #f4f4f8;   /* Soft gray */
    --success-color: #28a745;   /* Success green */
    --warning-color: #ffc107;   /* Warning yellow */
    --danger-color: #dc3545;    /* Danger red */
    --info-color: #17a2b8;      /* Info blue */
}

/* Override Bootstrap Colors */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
}

.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* General Layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    flex: 1 0 auto;
}

/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0 5px;
    z-index: 1000;
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
}

.mobile-nav a i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav a.active {
    color: var(--primary-color);
}

.mobile-nav-spacer {
    height: 65px; /* Matches mobile nav height */
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
    border: none;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-bottom: none;
    padding: 15px 20px;
}

.dashboard-card .card-body {
    padding: 20px;
}

/* Streak Display */
.streak-display {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    padding: 5px 15px;
    margin: 10px 0;
}

.streak-display .streak-flame {
    color: var(--highlight-color);
    font-size: 1.5rem;
    margin-right: 8px;
}

.streak-display .streak-count {
    font-weight: 600;
    color: var(--highlight-dark);
}

/* Gold Tier Badge */
.gold-tier-badge {
    background-color: var(--highlight-color);
    color: #333;
    border-radius: 15px;
    padding: 5px 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.gold-tier-badge i {
    margin-right: 5px;
}

/* Time Entry Form */
.time-entry-form {
    background-color: var(--neutral-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.time-slot {
    border-left: 4px solid var(--primary-color);
    padding: 10px 15px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 0 5px 5px 0;
    transition: transform 0.2s;
}

.time-slot:hover {
    transform: translateX(5px);
}

.time-slot.preferred {
    border-left-color: var(--highlight-color);
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.leaderboard-rank {
    font-weight: 700;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
}

.rank-1 {
    background-color: gold;
    color: #333;
}

.rank-2 {
    background-color: silver;
    color: #333;
}

.rank-3 {
    background-color: #cd7f32; /* Bronze */
    color: white;
}

.rank-other {
    background-color: var(--neutral-color);
    color: #666;
}

.leaderboard-score {
    margin-left: auto;
    font-weight: 600;
    color: var(--primary-color);
}

/* Module Cards */
.module-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.module-card:hover {
    transform: translateY(-5px);
}

.module-card .card-header {
    font-weight: 600;
    padding: 12px 20px;
}

.module-card.completed {
    border-color: var(--success-color);
}

.module-card.completed .card-header {
    background-color: var(--success-color);
    color: white;
}

.module-card.current {
    border-color: var(--highlight-color);
}

.module-card.current .card-header {
    background-color: var(--highlight-color);
    color: #333;
}

/* Analytics Charts */
.chart-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Form Styling */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(51, 119, 204, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Admin Dashboard */
.admin-stat-card {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    text-align: center;
    min-height: 150px;
    justify-content: center;
    color: white;
    transition: transform 0.3s;
}

.admin-stat-card:hover {
    transform: scale(1.05);
}

.admin-stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.admin-stat-card .stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.admin-stat-card.bg-primary {
    background-color: var(--primary-color);
}

.admin-stat-card.bg-success {
    background-color: var(--success-color);
}

.admin-stat-card.bg-warning {
    background-color: var(--warning-color);
}

.admin-stat-card.bg-danger {
    background-color: var(--danger-color);
}

.admin-stat-card.bg-info {
    background-color: var(--info-color);
}

/* Alerts and Notifications */
.alert-container {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--neutral-color);
}

.notification-icon {
    margin-right: 15px;
    font-size: 1.2rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.notification-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Media Queries */
@media (max-width: 768px) {
    .dashboard-stat {
        margin-bottom: 15px;
    }
    
    .admin-stat-card {
        min-height: 130px;
    }
    
    .admin-stat-card .stat-value {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .mobile-nav, .navbar, header, footer {
        display: none !important;
    }
    
    main {
        padding: 0 !important;
    }
    
    .dashboard-card, .chart-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}