* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

.dashboard {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.members-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.members-section .card {
    flex: 1;
}

.total-savings h2, .goal-progress h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.amount {
    font-size: 36px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 10px;
}

.currency-converter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#convertedAmount {
    font-weight: bold;
    color: #3498db;
}

.goal-container {
    margin-top: 20px;
}

.goal-bar {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    width: 0%;
    transition: width 0.5s ease;
}

.goal-text {
    text-align: right;
    font-size: 14px;
    color: #7f8c8d;
}

#goalPercentage {
    font-weight: bold;
    color: #2980b9;
}

.controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.controls input, .controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    flex: 1;
}

.members-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
}

.member-item:hover {
    background-color: #f8f9fa;
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: bold;
}

.member-date {
    font-size: 12px;
    color: #7f8c8d;
}

.member-amount {
    font-weight: bold;
    color: #27ae60;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.savings-goal .card {
    display: flex;
    flex-direction: column;
}

.goal-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.goal-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.member-details {
    margin: 20px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

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

#detailsHistory {
    list-style-type: none;
    margin-top: 10px;
}

#detailsHistory li {
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.actions .form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .dashboard, .members-section {
        flex-direction: column;
    }
    
    .goal-form {
        flex-direction: column;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        margin: 15% auto;
        width: 90%;
    }
}