:root {
    --primary-purple: #7b61ff;
    --bg-light: #f4f7f9;
    --border-color: #d1d9e0;
    --text-dark: #333;
    --success-green: #4caf50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-add {
    background-color: var(--primary-purple);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

.goal-list {
    list-style: none;
    padding: 0;
}

.goal-item {
    color: var(--primary-purple);
    font-weight: bold;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 14px; /* Smaller font */
}

.goal-item a {
    display: block;
    padding: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    color: inherit;
}

.goal-item.active {
    border-left: 3px solid var(--primary-purple);
    background: #f0edff;
}

/* Main Content */
.main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
}

.progress-bar {
    flex-grow: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    width: 40%; /* This will be dynamic */
    height: 100%;
    background: var(--success-green);
}

.content {
    padding: 40px;
    display: flex;
    gap: 50px;
}

/* Character & Goal Card */
.character-section {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.character-img {
    width: 100%;
    aspect-ratio: 3/4;
    background: #ccd5de; /* Placeholder */
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background-size: cover;
    background-position: center;
}

.goal-box {
    border: 1px solid var(--border-color);
    padding: 20px;
    background: white;
    text-align: center;
}

.goal-title {
    color: #b8a642;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Calendar Grid */
.calendar-section {
    display: flex;
    gap: 30px;
}

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

.phase-name {
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
}

.day-ball {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.day-ball.completed {
    background-color: #d1e7dd;
    border-color: #0f5132;
    color: #0f5132;
}

.gift-icon {
    font-size: 30px;
    cursor: pointer;
    opacity: 0.5;
    filter: grayscale(1);
    transition: all 0.3s;
}

.gift-icon.ready {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-top: 0;
}

#addGoalForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#addGoalForm input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

#addGoalForm button {
    padding: 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#addGoalForm button[type="submit"] {
    background-color: var(--primary-purple);
    color: white;
}

#addGoalForm button[type="button"] {
    background-color: #eee;
}

/* Character Selection Modal */
.character-selection-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.character-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: white;
}

.character-card:hover {
    border-color: var(--primary-purple);
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.character-card .char-name {
    font-weight: bold;
    font-size: 18px;
    color: var(--text-dark);
}