:root {
    --purple-reign: #604B8A;
    --purple-light: #7851A9;
    --purple-lighter: #E8DFF5;
}

body {
    background: linear-gradient(135deg, var(--purple-reign) 0%, var(--purple-light) 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 30px;
    padding-bottom: 40px;
}

.container {
    max-width: 900px;
}

.hero-section {
    background-color: white;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(96, 75, 138, 0.2);
    margin-bottom: 30px;
    text-align: center;
}

.hero-section h1 {
    color: var(--purple-reign);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 2.5rem;
    font-family: 'Manufacturing Consent', serif;
    letter-spacing: 2px;
}

.hero-section p {
    color: #777;
    font-size: 1.1rem;
    margin: 0;
}

.section-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(96, 75, 138, 0.15);
    padding: 30px;
    margin-bottom: 25px;
    border-top: 4px solid var(--purple-reign);
}

.section-card h2 {
    color: var(--purple-reign);
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.homie-entry {
    background-color: var(--purple-lighter);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 5px solid var(--purple-reign);
    transition: all 0.3s ease;
}

.homie-entry:hover {
    box-shadow: 0 3px 10px rgba(96, 75, 138, 0.15);
}

.expense-entry {
    background-color: #F0F8FF;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 5px solid #4CAF50;
    transition: all 0.3s ease;
}

.expense-entry:hover {
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.15);
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--purple-reign);
    box-shadow: 0 0 0 0.2rem rgba(96, 75, 138, 0.25);
}

.form-control::placeholder {
    color: #aaa;
}

.form-label {
    font-weight: 600;
    color: var(--purple-reign);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--purple-reign);
    border-color: var(--purple-reign);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
    margin-right: 8px;
}

.btn-primary:hover {
    background-color: var(--purple-light);
    border-color: var(--purple-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 75, 138, 0.3);
}

.btn-danger {
    background-color: #FF6B6B;
    border-color: #FF6B6B;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #EE5A52;
    border-color: #EE5A52;
}

.btn-add {
    background-color: var(--purple-reign);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background-color: var(--purple-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 75, 138, 0.3);
}

.btn-calculate {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-calculate:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.output-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
    padding: 30px;
    border-top: 4px solid #4CAF50;
}

.output-section h2 {
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.result-item {
    background: linear-gradient(135deg, var(--purple-lighter) 0%, #F0F8FF 100%);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 5px solid var(--purple-reign);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 5px 15px rgba(96, 75, 138, 0.15);
    transform: translateX(5px);
}

.result-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple-reign);
}

.result-income {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.result-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4CAF50;
    text-align: right;
}

.result-label {
    color: #666;
    font-size: 0.85rem;
    margin-top: 3px;
}

.expense-section {
    background-color: #F0F8FF;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #4CAF50;
    margin-bottom: 20px;
}

.expense-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--purple-reign);
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(76, 175, 80, 0.3);
}

.expense-section-header strong {
    flex: 1;
}

.expense-section-header span {
    color: #4CAF50;
    font-weight: 700;
}

.expense-homies-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expense-homie-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.expense-homie-item span:first-child {
    color: #444;
    font-weight: 500;
}

.income-percentage {
    color: #999;
    font-weight: 400;
    font-size: 0.85rem;
}

.expense-homie-item span:last-child {
    color: #4CAF50;
    font-weight: 600;
}

.error {
    background-color: #FFE5E5;
    color: #C33030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 5px solid #FF6B6B;
    font-weight: 500;
}

.expense-breakdown {
    background-color: var(--purple-lighter);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid var(--purple-reign);
}

.expense-breakdown h3 {
    color: var(--purple-reign);
    font-weight: 600;
    margin-bottom: 15px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #444;
}

.expense-total {
    border-top: 2px solid rgba(96, 75, 138, 0.3);
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 700;
    color: var(--purple-reign);
    display: flex;
    justify-content: space-between;
}

.container-section {
    margin-bottom: 15px;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #999;
    padding: 30px 20px;
    font-size: 1.05rem;
}

/* Homie checkbox styling */
.homie-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--purple-reign);
}

.form-check-label {
    cursor: pointer;
    color: #444;
    font-weight: 500;
    margin: 0;
}

.form-check-label:hover {
    color: var(--purple-reign);
}
