:root {
    /* Light Mode Variables */
    --bg-color: #4fa5d8;
    --surface-color: #ffffff;
    --text-primary: #0e150d;
    --text-secondary: #0e150d;
    --primary-color: #0e150d;
    --primary-light: #4fa5d8;
    --border-color: #0e150d;
    --modal-overlay: rgba(0,0,0,0.5);
    --shadow: none;
}

body.dark-mode {
    /* Dark Mode Variables */
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --primary-color: #90caf9;
    --primary-light: #121212;
    --border-color: #0e150d;
    --modal-overlay: rgba(255,255,255,0.1);
    --shadow: none;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
}

/* App Bar */
.app-bar {
    background-color: var(--surface-color);
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: var(--shadow);
    z-index: 100;
}

.app-bar-title {
    font-size: 20px;
    font-weight: 500;
}

.app-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.icon-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: rgba(150, 150, 150, 0.2);
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.text-btn:hover {
    background-color: rgba(150, 150, 150, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 4px;
    transition: opacity 0.2s;
    width: 100%;
    margin-top: 15px;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Calendar Container */
.calendar-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calendar {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    transition: background-color 0.3s ease, border 0.3s ease;
    position: relative;
    border: 8px solid var(--border-color);
    box-shadow: var(--shadow);
}

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

.header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 16px;
}

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

.day {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    position: relative;
    font-size: 16px;
}

.day:hover:not(.empty) {
    background-color: rgba(0, 0, 0, 0.1);
}

.day.selected {
    border: 2px solid var(--border-color);
}

.current {
    background-color: rgba(0,0,0,0.1) !important;
    color: var(--text-primary) !important;
    font-weight: 900;
}

.birthday {
    font-weight: 700;
}

.birthday::after {
    content: "•";
    font-size: 20px;
    color: var(--primary-color);
    position: absolute;
    bottom: -10px;
}

.birthday-label {
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: none;
}

.add-event-btn-inline {
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 12px;
    width: auto;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface-color);
    color: var(--text-primary);
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 350px;
    box-shadow: var(--shadow);
    position: relative;
}

.modal-content h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.close:hover {
    color: var(--text-primary);
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: inherit;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}
