:root {
    --gradient-start: #00f2c3;
    --gradient-end: #0098f0;
    --primary: #0098f0;
    --secondary: #00f2c3;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --bg-light: #ffffff;
    --bg-dark: #1a202c;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --bg-light: #1a202c;
    --card-bg: #2d3748;
    --input-bg: #2d3748;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

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

.streak-counter {
    color: white;
    font-size: 0.875rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

h1, h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
}

h1 {
    font-weight: 600;
    font-size: 2rem;
    color: white;
}

h2 {
    font-weight: 500;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.main-content {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.memory-form {
    margin-bottom: 2rem;
}

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

label {
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="datetime-local"],
select,
textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

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

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 152, 240, 0.1);
}

.tags-input {
    position: relative;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag button {
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--input-bg);
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.filters {
    margin-bottom: 2rem;
    display: grid;
    gap: 1rem;
}

.search-box input {
    width: 100%;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    flex: 1;
}

.insights-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.chart-container h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.report-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: 300px;
}

.report-card canvas {
    max-height: 220px !important;
}

.memory-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.memory-list li {
    padding: 1rem;
    background: var(--input-bg);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.btn-secondary {
    background: var(--input-bg);
    color: var(--primary);
    border: 1px solid #e2e8f0;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .form-row,
    .insights-container {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .insights-container {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .report-card {
        height: 250px;
    }

    .report-card canvas {
        max-height: 170px !important;
    }
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid var(--secondary);
}

.notification.error {
    border-left: 4px solid #ef4444;
}

/* Navigation */
.app-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: var(--input-bg);
    border: none;
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

/* Views */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view.active {
    display: block;
    opacity: 1;
}

/* Goals */
.goals-container {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

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

.goal-card {
    background: var(--input-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.goal-card.high { border-color: #ef4444; }
.goal-card.medium { border-color: #f59e0b; }
.goal-card.low { border-color: #10b981; }

.goal-card.completed {
    opacity: 0.7;
}

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

.goal-progress {
    margin: 1rem 0;
}

.progress-bar {
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.deadline.urgent { color: #ef4444; }
.deadline.overdue { color: #7f1d1d; }

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.1);
}

/* Pomodoro */
.pomodoro-container {
    text-align: center;
    padding: 2rem;
}

.timer-display {
    font-size: 6rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 2rem;
    color: var(--primary);
}

.timer-display.break {
    color: var(--secondary);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.timer-settings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Reports */
.reports-container {
    padding: 1.5rem;
}

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

.date-range {
    display: flex;
    gap: 0.5rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.productivity-score {
    font-size: 4rem;
    font-weight: 600;
    text-align: center;
    color: var(--primary);
}

.productivity-score.high { color: #10b981; }
.productivity-score.medium { color: #f59e0b; }
.productivity-score.low { color: #ef4444; }

.productivity-score small {
    font-size: 1rem;
    opacity: 0.7;
}

/* Image Preview */
.image-preview {
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    height: auto;
}

/* Modal */
.modal {
    border: none;
    border-radius: 1rem;
    padding: 0;
    background: var(--card-bg);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .timer-display {
        font-size: 4rem;
    }
    
    .timer-settings {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.app-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.credits {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.credits a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.credits a:hover {
    color: var(--secondary);
}

@media (max-width: 768px) {
    .app-footer {
        margin-top: 2rem;
        padding: 1rem;
    }
}
