:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #f4f7f6;
    --font-color: #333;
    --card-bg: #ffffff;
    --green-accent: #28a745;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--font-color);
    line-height: 1.6;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}
.auth-container form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 350px;
}
.auth-container h2 { margin-bottom: 20px; }
.auth-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.auth-container button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.auth-container button:hover { background: var(--primary-color); }
.auth-container p { margin-top: 15px; }
.error { color: #d9534f; margin-bottom: 10px; }


/* Main App */
header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem 5%;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color);
}
nav ul { list-style: none; display: flex; }
nav ul li { margin-left: 20px; }
nav ul li a { text-decoration: none; color: var(--font-color); font-weight: 400; transition: color 0.3s; }
nav ul li a:hover { color: var(--secondary-color); }

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

/* Calendar */
#calendar-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}
#calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
#calendar-header button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
}
#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}
.day {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    position: relative;
}
.day:hover { transform: translateY(-3px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.day.completed {
    background: var(--green-accent);
    color: white;
}
.day.today {
    border: 2px solid var(--secondary-color);
}
.day-name { text-align: center; font-weight: 600; color: #777; margin-bottom: 10px; }

/* Motivation Box */
.motivation {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

/* History Page */
.chart-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

/* Stiluri pentru Fereastra Modală */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.modal-content textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-save { background: var(--green-accent); color: white; }
.btn-save:hover { background: #218838; }

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

.btn-close { background: #6c757d; color: white; }
.btn-close:hover { background: #5a6268; }