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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
}

/* ===== DateTime & Timezone Styles ===== */
.datetime-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
}

.current-datetime {
    margin-bottom: 10px;
}

.current-datetime span {
    display: block;
    color: white;
    font-size: 1.1em;
}

#currentDate {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 5px;
}

#currentTime {
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    font-weight: bold;
}

.timezone-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.timezone-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
}

.balance-card, .income-card, .expense-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid;
}

.balance-card {
    border-left-color: #3498db;
}

.income-card {
    border-left-color: #27ae60;
}

.expense-card {
    border-left-color: #e74c3c;
}

.amount {
    font-size: 2em;
    font-weight: bold;
    margin-top: 10px;
}

.positive {
    color: #27ae60;
}

.negative {
    color: #e74c3c;
}

.add-transaction {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.add-transaction h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.transactions {
    padding: 30px;
}

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

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-income {
    border-left: 4px solid #27ae60;
}

.transaction-expense {
    border-left: 4px solid #e74c3c;
}

.transaction-info h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.transaction-meta {
    font-size: 0.9em;
    color: #7f8c8d;
}

.transaction-time {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 2px;
}

.transaction-amount {
    font-weight: bold;
    font-size: 1.1em;
}

.income-amount {
    color: #27ae60;
}

.expense-amount {
    color: #e74c3c;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #c0392b;
}

.budget-progress {
    padding: 30px;
    background: #f8f9fa;
}

.progress-container {
    margin-bottom: 20px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.budget-setter {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* ===== Micromodal Styles ===== */
.modal {
    display: none;
}

.modal.is-open {
    display: block;
}

.modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal__container {
    background-color: #fff;
    padding: 0;
    max-width: 500px;
    max-height: 90vh;
    width: 90%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal__header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 25px 30px;
    position: relative;
}

.modal__title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.modal__close {
    background: transparent;
    border: 0;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: white;
    font-size: 1.5em;
}

.modal__close:hover {
    opacity: 0.7;
}

.modal__content {
    padding: 30px;
}

.modal__footer {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e9ecef;
}

.timezone-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
}

.timezone-select:focus {
    outline: none;
    border-color: #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .overview {
        grid-template-columns: 1fr;
    }
    
    .budget-setter {
        flex-direction: column;
    }
    
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .modal__container {
        width: 95%;
        margin: 20px;
    }
}