/* ==========================================
   TRAKLIFE - COMPLETE UNIFIED CSS
   ==========================================
   All styles for TrakTime, TrakWins, and TrakChange
   Includes navigation, mobile menu, and all components
   ========================================== */

/* ==========================================
   1. RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    line-height: 1.6;
}

/* ==========================================
   2. NAVIGATION - MOBILE READY
   ========================================== */

.traklife-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 20px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: #764ba2;
}

.nav-logo img,
.nav-logo svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.nav-logo svg {
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-menu a {
    color: #4a5568;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: #f0f4ff;
    color: #667eea;
}

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

.mobile-menu-toggle {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #764ba2;
}

/* ==========================================
   3. OFFLINE INDICATOR
   ========================================== */

.offline-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #f56565;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    z-index: 2000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.offline-indicator.show {
    display: block;
}

/* ==========================================
   4. CONTAINER & LAYOUT
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
}

/* ==========================================
   5. HEADER SECTION
   ========================================== */

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Header for TrakWins/TrakChange */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

.header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ==========================================
   6. DASHBOARD & STATS
   ========================================== */

.dashboard {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.dashboard-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

/* Target Hours Input Group */
.target-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.target-input-group label {
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.target-input-group input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    text-align: center;
}

.target-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.target-input-group button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.target-input-group button:hover {
    background: #5568d3;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #333;
    font-size: 2em;
    font-weight: 700;
}

/* Stats Bar for TrakWins */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-description {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Progress Container */
.progress-container {
    background: rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    height: 40px;
    overflow: hidden;
    position: relative;
    margin-bottom: 25px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: white;
    font-size: 0.95em;
    z-index: 1;
}

/* ==========================================
   7. TAG BREAKDOWN SECTION
   ========================================== */

.tag-breakdown {
    margin-top: 30px;
}

.tag-breakdown-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-breakdown-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.tag-breakdown-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.tag-breakdown-label {
    min-width: 120px;
    font-weight: 500;
    color: #333;
}

.tag-breakdown-bar-container {
    flex: 1;
    background: #f0f0f0;
    border-radius: 8px;
    height: 24px;
    overflow: hidden;
    position: relative;
}

.tag-breakdown-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.tag-breakdown-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85em;
    font-weight: 600;
    color: #333;
}

/* Pie Chart Container - MOBILE OPTIMIZED */
.pie-chart-container {
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    padding: 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

#pieChart {
    width: 300px !important;
    height: 300px !important;
    flex-shrink: 0;
}

#pieLegend {
    flex: 1;
    max-width: 350px;
}

@media (max-width: 768px) {
    .pie-chart-container {
        flex-direction: column;
        align-items: center;
    }

    #pieChart {
        width: 250px !important;
        height: 250px !important;
    }

    #pieLegend {
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
    }
}

/* ==========================================
   8. CARD COMPONENT (TrakTime)
   ========================================== */

.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

/* ==========================================
   9. TIME ENTRY FORM
   ========================================== */

.entry-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.form-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Tag Selection */
.tag-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-option {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.tag-option:hover {
    background: #e8e8e8;
    border-color: #667eea;
}

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

/* ==========================================
   9. BUTTONS
   ========================================== */

.submit-btn,
.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.submit-btn:active,
.btn:active {
    transform: translateY(0);
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c82333;
}

/* ==========================================
   10. TIME ENTRIES LIST
   ========================================== */

.entries-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

/* Month Navigation */
.month-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.month-nav button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.month-nav button:hover {
    background: #5568d3;
}

.current-month {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
    min-width: 150px;
    text-align: center;
}

.current-month-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.current-month-btn:hover {
    background: #218838;
}

/* Export/Import Buttons */
.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn,
.import-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.export-btn:hover,
.import-btn:hover {
    background: #5568d3;
}

.import-btn {
    background: #28a745;
}

.import-btn:hover {
    background: #218838;
}

/* File Input */
#jsonFileInput {
    display: none;
}

/* Entry Cards */
.entry-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.entry-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.entry-date {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.entry-time {
    color: #667eea;
    font-weight: 600;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.entry-tag {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.entry-description,
.entry-notes {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-duration {
    background: #667eea;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1em;
}

/* Entries List (TrakTime) */
.entries-list {
    margin-top: 15px;
}

.entry-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.entry-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Export/Import Buttons (TrakTime) */
.export-import-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.export-import-buttons button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.export-import-buttons button:hover {
    background: #5568d3;
}

/* Tags (TrakTime) */
.tag {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Duration Display (TrakTime) */
.duration-display {
    padding: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
    text-align: center;
}

/* Legend Items (Pie Chart) */
.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-text {
    flex: 1;
}

.legend-label {
    font-weight: 600;
    color: #333;
}

.legend-value {
    font-size: 0.9em;
    color: #666;
}

/* Submit/Add Entry Button (TrakTime) */
#timeEntryForm button[type="submit"],
#submitBtn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#timeEntryForm button[type="submit"]:hover,
#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Edit Button in Entry Items */
.entry-item .edit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.entry-item .edit-btn:hover {
    background: #5568d3;
}

/* Entry footer button container */
.entry-footer > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Month Navigation Buttons - Desktop */
#monthSelector button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#monthSelector button:hover {
    background: #5568d3;
}

/* ==========================================
   11. TRAKWINS - WIN ENTRIES & CALENDAR
   ========================================== */

.add-win-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.add-win-section .section-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.image-upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
    position: relative;
}

.image-upload-area:hover {
    background: #f0f4ff;
    border-color: #764ba2;
}

.image-upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-text {
    color: #667eea;
    font-weight: 600;
}

.image-preview {
    display: none;
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-preview.show {
    display: block;
}

.image-upload-area.has-image {
    padding: 15px;
}

.image-upload-area.has-image .upload-icon,
.image-upload-area.has-image .upload-text {
    display: none;
}

.image-upload-area.loading {
    opacity: 0.7;
    pointer-events: none;
}

.image-upload-area.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.data-management {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

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

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
}

.win-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.win-form h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-section {
    margin-bottom: 20px;
}

.form-section label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-section input[type="date"],
.form-section input[type="text"],
.form-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-section input:focus,
.form-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-section textarea {
    resize: vertical;
    min-height: 100px;
}

.photo-upload {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.photo-upload:hover {
    background: #f0f4ff;
    border-color: #764ba2;
}

.photo-upload input[type="file"] {
    display: none;
}

.photo-preview {
    margin-top: 15px;
}

.photo-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calendar-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.calendar-nav button:hover {
    background: #764ba2;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 10px;
    font-size: 0.9rem;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calendar-day:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.calendar-day.has-win {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.calendar-day.has-win::after {
    content: '🔵';
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.7em;
}

.calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.day-number {
    font-weight: 600;
    color: #333;
}

.win-thumbnail {
    width: 100%;
    height: 60%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 4px;
}

/* Mobile Calendar - Clean Dot Indicator */
@media (max-width: 768px) {
    .calendar-day {
        padding: 8px 4px;
        border-radius: 8px;
        min-height: 44px;
        justify-content: center;
    }
    
    /* Hide thumbnails and text on mobile */
    .calendar-day .win-thumbnail,
    .calendar-day .win-title {
        display: none !important;
    }
    
    .day-number {
        font-size: 0.9em;
        margin: 0;
    }
    
    /* Replace emoji with clean colored dot */
    .calendar-day.has-win::after {
        content: '';
        width: 8px;
        height: 8px;
        background: #667eea;
        border-radius: 50%;
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0;
    }
    
    .calendar-day.has-win {
        background: white;
        border-color: #667eea;
    }
    
    /* Style for today */
    .calendar-day.today {
        background: #f0f4ff;
        border-color: #667eea;
        font-weight: 700;
    }
}

/* Win Detail Modal */
.win-title {
    font-size: 0.75em;
    color: #667eea;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Win Detail Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    padding: 20px;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: #c82333;
}

.win-detail-image {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
}

.win-detail-title {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.win-detail-date {
    color: #666;
    margin-bottom: 15px;
    font-size: 1rem;
}

.win-detail-description {
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.win-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    padding: 20px;
    overflow-y: auto;
}

.win-detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.win-detail-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.win-detail-content h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.win-detail-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 15px 0;
}

.close-modal {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
}

/* ==========================================
   12. TRAKCHANGE - DAY COUNTER
   ========================================== */

.counter-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
}

.day-counter {
    font-size: 8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    line-height: 1;
}

.day-label {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 600;
}

.start-date {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 30px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.reset-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.edit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* ==========================================
   13. RESPONSIVE DESIGN - MOBILE
   ========================================== */

@media (max-width: 768px) {
    /* Mobile Navigation */
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 12px;
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* General Mobile Adjustments */
    h1 {
        font-size: 2em;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    /* Fix for iOS date/time picker */
    input[type="date"],
    input[type="time"] {
        min-height: 44px;
        font-size: 16px;
        touch-action: manipulation;
    }
    
    /* Pie Chart Mobile Fix */
    .pie-chart-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    #pieChart {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    
    .container {
        padding: 0 10px 10px 10px;
    }
    
    header {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .dashboard,
    .entry-form,
    .entries-section,
    .win-form,
    .calendar-section,
    .counter-container {
        padding: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .target-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .target-input-group input,
    .target-input-group button {
        width: 100%;
    }
    
    .entries-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .month-nav button {
        width: 100%;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-btn,
    .import-btn {
        width: 100%;
        justify-content: center;
    }
    
    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .entry-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* TrakWins Mobile - Tighter Calendar */
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        padding: 6px 2px;
        font-size: 0.85em;
        min-height: 40px;
    }
    
    .calendar-day-header {
        font-size: 0.75em;
        padding: 6px 2px;
    }
    
    .day-number {
        font-size: 0.85em;
    }
    
    /* Smaller dot on very small screens */
    .calendar-day.has-win::after {
        width: 6px;
        height: 6px;
        bottom: 3px;
    }
    
    .day-counter {
        font-size: 5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .reset-btn,
    .edit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .day-counter {
        font-size: 4em;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 375px) {
    /* Reduce month display size */
    #currentMonthDisplay {
        font-size: 0.95em !important;
        min-width: 120px !important;
    }
}

/* ==========================================
   14. UTILITY CLASSES
   ========================================== */

.hidden {
    display: none !important;
}

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

/* ==========================================
   15. ANIMATIONS
   ========================================== */

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ==========================================
   TRAKCHANGE - Day Counter Styles
   ========================================== */

.page-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.page-wrapper .container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.page-wrapper h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
}

.days-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.days-number {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.days-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

.date-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #666;
}

.date-info p {
    margin: 0;
}

.encouragement {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
}

.quote {
    font-style: italic;
    color: #666;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 0 10px 10px 0;
    margin-bottom: 30px;
    text-align: left;
}

.quote-attribution {
    margin-top: 10px;
    font-style: normal;
    font-weight: 600;
    color: #764ba2;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.controls .button {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.controls .button.reset {
    background: #dc3545;
}

.controls .button.reset:hover {
    background: #c82333;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.4);
}

.date-input-section {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.date-input-section.active {
    display: block;
}

.date-input {
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    width: 100%;
    max-width: 250px;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
}

.page-wrapper .footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .page-wrapper .container {
        padding: 30px 20px;
    }

    .days-container {
        width: 160px;
        height: 160px;
    }

    .days-number {
        font-size: 3rem;
    }

    .page-wrapper h1 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   TRAKWINS - Enhanced Styles
   ========================================== */

/* Today's Win Card */
.todays-win-card {
    background: white;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.todays-win-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    text-align: center;
}

.todays-win-card-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.todays-win-card-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin: 0;
}

.todays-win-section {
    padding: 20px;
}

.todays-win-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 12px;
}

.todays-win-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 12px;
}

.todays-win-content .no-win-yet {
    color: #aaa;
    font-style: italic;
    margin: 0;
    padding: 15px 0;
}

.todays-win-display {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.2s;
}

.todays-win-display:hover {
    background: #f8f9fa;
}

.todays-win-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.todays-win-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

.todays-win-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Add Win Button */
.btn-add-win {
    margin-top: 15px;
}

/* Cloud Sync Section */
.cloud-sync-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.btn-sync {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-sync:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sync-status {
    font-size: 0.85rem;
    color: #666;
}

/* Drag and Drop Upload */
.image-upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

/* Calendar Today Indicator with Purple Dot */
.calendar-day.today .day-number::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #764ba2;
    border-radius: 50%;
}

.calendar-day .day-number {
    position: relative;
}

/* Jump to Today Button */
.jump-today-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.jump-today-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

/* Month Navigation Buttons */
.month-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-nav-btn:hover {
    background: #667eea;
    color: white;
}

/* Mobile Calendar Nav */
@media (max-width: 480px) {
    .month-nav {
        gap: 5px;
    }

    .month-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .current-month {
        font-size: 0.9rem;
        min-width: auto;
        padding: 0 8px;
    }

    .jump-today-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        margin-left: 5px;
    }

    .todays-win-card {
        padding: 15px;
    }

    .todays-win-image {
        width: 50px;
        height: 50px;
    }
}

/* ==========================================
   NAV USER MENU
   ========================================== */

.nav-user-menu {
    position: relative;
    cursor: pointer;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.nav-user-name {
    color: #667eea;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(102, 126, 234, 0.1);
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 5px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
    padding-top: 10px;
}

.nav-user-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.nav-user-menu:hover .nav-user-dropdown {
    display: block;
}

.nav-user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-user-dropdown a:hover {
    background: #f5f5f5;
    color: #667eea;
}

@media (max-width: 768px) {
    .nav-user-menu {
        width: 100%;
    }

    .nav-user-name {
        display: block;
        text-align: center;
        max-width: none;
    }

    .nav-user-dropdown {
        position: static;
        display: block;
        box-shadow: none;
        background: transparent;
        margin-top: 10px;
    }

    .nav-user-dropdown a {
        text-align: center;
        background: rgba(102, 126, 234, 0.05);
        margin: 5px 0;
        border-radius: 8px;
    }
}

/* ==========================================
   POMODORO TIMER
   ========================================== */

.pomodoro-card {
    margin-bottom: 25px;
}

.pomodoro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

.pomodoro-toggle {
    color: #667eea;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.pomodoro-content {
    margin-top: 20px;
}

.pomodoro-display {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 15px;
    margin-bottom: 20px;
}

.pomodoro-timer {
    font-size: 4rem;
    font-weight: 700;
    color: #333;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    letter-spacing: 2px;
}

.pomodoro-session {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

.pomodoro-progress {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.pomodoro-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 1s linear;
    width: 0%;
}

.pomodoro-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.pomodoro-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #f0f0f0;
    color: #333;
}

.pomodoro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.pomodoro-btn-primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pomodoro-settings {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.pomodoro-setting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomodoro-setting label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.pomodoro-setting input {
    width: 60px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

.pomodoro-setting input:focus {
    outline: none;
    border-color: #667eea;
}

.pomodoro-setting span {
    font-size: 0.85rem;
    color: #888;
}

.pomodoro-log-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pomodoro-log-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.pomodoro-log-option label {
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

@media (max-width: 480px) {
    .pomodoro-timer {
        font-size: 3rem;
    }

    .pomodoro-controls {
        flex-wrap: wrap;
    }

    .pomodoro-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .pomodoro-settings {
        gap: 15px;
    }

    .pomodoro-setting {
        flex-basis: 100%;
        justify-content: center;
    }
}

/* ==========================================
   SETTINGS MODAL
   ========================================== */

.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.settings-modal.show {
    display: flex;
}

.settings-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
}

.settings-modal-header h2 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.settings-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.settings-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.settings-modal-body {
    padding: 25px;
}

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
}

.settings-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
}

.settings-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.settings-btn-icon {
    font-size: 1.1rem;
}

.settings-danger h3 {
    color: #dc3545;
}

.settings-btn-danger {
    background: #dc3545;
}

.settings-btn-danger:hover {
    background: #c82333;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.settings-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.settings-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.settings-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 480px) {
    .settings-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .settings-modal-header {
        border-radius: 0;
    }

    .settings-buttons {
        flex-direction: column;
    }

    .settings-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   PROFILE SETTINGS & AVATARS
   ========================================== */

/* Profile Photo Section in Settings */
.profile-photo-section {
    margin-bottom: 25px;
}

.profile-photo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid #e0e0e0;
    transition: border-color 0.2s;
}

.profile-photo-preview.has-photo {
    border-color: #667eea;
}

.profile-photo-placeholder {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.settings-btn-secondary {
    background: #6c757d;
}

.settings-btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* Settings Form Groups */
.settings-form-group {
    margin-bottom: 20px;
}

.settings-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.settings-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.settings-form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #888;
}

/* Nav User Avatar */
.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}

.nav-user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-user-menu {
    display: flex;
    align-items: center;
}

/* Dashboard Avatar */
.dashboard-avatar-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.dashboard-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-welcome-text h1 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
}

.dashboard-welcome-text p {
    margin: 0;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .profile-photo-container {
        flex-direction: column;
        text-align: center;
    }

    .profile-photo-actions {
        flex-direction: row;
        justify-content: center;
    }

    .dashboard-avatar-container {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-avatar,
    .dashboard-avatar-placeholder {
        width: 60px;
        height: 60px;
    }

    .dashboard-welcome-text h1 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   END OF STYLESHEET
   ========================================== */