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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== HEADER ========== */
.dashboard-header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.dashboard-header h1 {
  font-size: 2.5em;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: text;              /* standard */
  -webkit-background-clip: text;      /* Safari/Chrome */
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.dashboard-header p {
    font-size: 1.1em;
    color: #666;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== CONTENT GRID ========== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card.full-width {
    grid-column: 1 / -1;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.card-description {
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========== BUTTONS ========== */
.btn-primary,
.btn-secondary,
.btn-danger {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #4CAF50;
    color: white;
}

.btn-secondary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

/* ========== TIMER ========== */
.timer-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 20px;
}

.timer {
    font-size: 4em;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.subject-display {
    font-size: 1.3em;
    opacity: 0.9;
}

.session-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ========== FEEDBACK BOXES ========== */
.feedback-box,
.insights-box,
.tips-box,
.prediction-box,
.advice-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
}

.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.info-msg {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

/* ========== INSIGHTS ========== */
.insight-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.advice-list {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #ffc107;
}

/* ========== TIPS ========== */
.tips-list {
    margin-top: 15px;
}

.tip-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* ========== PREDICTION ========== */
.prediction-result {
    text-align: center;
    padding: 20px;
}

.focus-score {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

/* ========== SESSIONS LIST ========== */
.sessions-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

.session-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.session-item:hover {
    transform: translateX(5px);
    background: #e9ecef;
}

/* ========== FOOTER ========== */
.footer-actions {
    text-align: center;
    margin-top: 30px;
}

.footer-actions button {
    max-width: 300px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-header h1 {
        font-size: 1.8em;
    }

    .timer {
        font-size: 3em;
    }

    .session-actions {
        grid-template-columns: 1fr;
    }
}

/* ========== SCROLLBAR ========== */
.sessions-container::-webkit-scrollbar {
    width: 8px;
}

.sessions-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sessions-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.sessions-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.stat-card {
    animation: fadeIn 0.5s ease-out;
}