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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.4;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* User Selection */
.user-selection {
    text-align: center;
    padding: 60px 0;
}

.user-selection h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.user-selection p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #666;
}

.user-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.user-btn {
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.2s;
}

.user-btn.colter {
    background: #2196F3;
    color: white;
}

.user-btn.tai {
    background: #E91E63;
    color: white;
}

.user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Main App */
.main-app {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Expense Form */
.expense-form {
    background: #2d2d2d;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 1px solid #404040;
}

.expense-form h2 {
    margin-bottom: 20px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #404040;
    border-radius: 10px;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.note-toggle {
    background: none;
    border: none;
    color: #2196F3;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 10px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.date-btn, .user-btn {
    width: 100%;
    padding: 15px;
    border: 2px solid #404040;
    border-radius: 10px;
    background: #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #45a049;
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #404040;
    color: #e0e0e0;
}

.suggestion-item:hover {
    background: #404040;
}

/* Totals Section */
.totals-section {
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.totals-header {
    text-align: center;
    margin-bottom: 20px;
}

.totals-header h3 {
    font-weight: 400;
    color: #555;
}

.totals {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.user-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    flex: 1;
    margin: 0 10px;
}

.user-total.colter {
    background: #313131;
    color: #1976D2;
}

.user-total.tai {
    background: #2b2b2b;
    color: #C2185B;
}

.user-total span:first-child {
    font-size: 14px;
    margin-bottom: 5px;
}

.user-total span:last-child {
    font-size: 24px;
}

.settle-up {
    text-align: center;
}

.settle-btn {
    background: #FF9800;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* Expense List */
.expense-list {
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.expense-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px 10px;
    border-bottom: 1px solid #404040;
    gap: 10px;
}

.expense-header h3 {
    font-weight: 400;
    color: #b0b0b0;
    margin: 0;
}

.nav-btn {
    background: #404040;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    color: #e0e0e0;
    transition: background 0.2s;
}

.nav-btn:hover {
    background: #505050;
}

.nav-btn:disabled {
    background: #2d2d2d;
    color: #666;
    cursor: not-allowed;
}

.stats-btn {
    background: #4CAF50;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    color: white;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-btn:hover {
    background: #45a049;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #404040;
    font-size: 15px;
    background: #2d2d2d;
}

.expense-item:last-child {
    border-bottom: none;
}

.expense-item.colter {
    border-left: 4px solid #2196F3;
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.15) 0%, #2d2d2d 50%);
}

.expense-item.tai {
    border-left: 4px solid #E91E63;
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.15) 0%, #2d2d2d 50%);
}

/* Month Headers */
.month-header {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    margin: 10px 0;
    font-weight: 600;
    color: #b0b0b0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.month-header span {
    flex-shrink: 0;
    margin-right: 15px;
}

.month-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #404040 0%, transparent 100%);
}

/* Month color coding */
.expense-item[data-month="01"] { border-right: 3px solid #FF6B6B; }
.expense-item[data-month="02"] { border-right: 3px solid #4ECDC4; }
.expense-item[data-month="03"] { border-right: 3px solid #45B7D1; }
.expense-item[data-month="04"] { border-right: 3px solid #96CEB4; }
.expense-item[data-month="05"] { border-right: 3px solid #FCEA2B; }
.expense-item[data-month="06"] { border-right: 3px solid #FF9FF3; }
.expense-item[data-month="07"] { border-right: 3px solid #FFA07A; }
.expense-item[data-month="08"] { border-right: 3px solid #98D8C8; }
.expense-item[data-month="09"] { border-right: 3px solid #F7DC6F; }
.expense-item[data-month="10"] { border-right: 3px solid #BB8FCE; }
.expense-item[data-month="11"] { border-right: 3px solid #85C1E9; }
.expense-item[data-month="12"] { border-right: 3px solid #F8C471; }

.expense-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.expense-name {
    font-weight: 600;
    font-size: 16px;
}

.expense-note {
    color: #999;
    font-size: 13px;
}

.expense-date {
    color: #777;
    font-size: 12px;
}

.expense-amount {
    font-weight: 700;
    font-size: 18px;
}

.expense-amount.colter {
    color: #2196F3;
}

.expense-amount.tai {
    color: #E91E63;
}

/* Password input in user selection */
#password-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #404040;
    border-radius: 10px;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

#password-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.password-error {
    color: #f44336;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Mobile Optimizations */
@media (max-width: 400px) {
    .container {
        padding: 15px;
    }
    
    .user-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .user-btn {
        width: 200px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .totals {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-total {
        margin: 0;
    }
}