:root {
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary-color: #00cec9;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --info-color: #0984e3;
    --light-color: #f8f9fa;
    --dark-color: #2d3436;
    --text-color: #2d3436;
    --text-light: #636e72;
    --glass-color: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1604594849809-dfedbc827105?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    position: relative;
}

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

.app-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.app-title i {
    font-size: 2rem;
    color: var(--warning-color);
}

.app-title h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(to right, #fff, var(--warning-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.total-balance {
    margin-bottom: 25px;
}

.total-balance h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.total-balance p {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.inc-exp-container {
    background-color: var(--glass-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    display: flex;
    justify-content: space-between;
    margin: 20px auto;
    max-width: 600px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.inc-exp-container div {
    flex: 1;
    text-align: center;
}

.inc-exp-container div:first-of-type {
    border-right: 1px solid var(--glass-border);
}

.inc-box h4, .exp-box h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
}

.inc-box h4 {
    color: var(--success-color);
}

.exp-box h4 {
    color: var(--danger-color);
}

.money {
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin: 5px 0;
    font-weight: bold;
}

.money.plus {
    color: var(--success-color);
}

.money.minus {
    color: var(--danger-color);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.glass-card {
    background: var(--glass-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 25px;
    color: white;
}

.transaction-section {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.form-section {
    grid-column: 2 / 3;
}

.analytics-section {
    grid-column: 2 / 3;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.section-header h3 {
    font-size: 1.4rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.btn-small {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-small.danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-small.danger:hover {
    background-color: #c0392b;
}

.transactions {
    list-style-type: none;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.transactions::-webkit-scrollbar {
    width: 6px;
}

.transactions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.transactions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.transactions li {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    border-radius: 8px;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.transactions li:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.15);
}

.transactions li.plus {
    border-left-color: var(--success-color);
}

.transactions li.minus {
    border-left-color: var(--danger-color);
}

.transaction-details {
    flex: 1;
}

.transaction-text {
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

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

.transaction-category {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    margin-top: 8px;
    color: white;
}

.transaction-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    cursor: pointer;
    position: absolute;
    top: -10px;
    right: -10px;
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.transactions li:hover .delete-btn {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.3);
}

.empty-state p {
    font-size: 1.1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 1rem;
    color: white;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: linear-gradient(to right, #5e4dcd, #00b5ad);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab-btn.active {
    color: white;
}

.tab-btn.active:after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.chart-container {
    margin: 20px 0;
    height: 300px;
    position: relative;
}

.category-breakdown {
    margin-top: 25px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: var(--transition);
}

.category-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.category-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-amount {
    font-weight: bold;
}

.category-amount.plus {
    color: var(--success-color);
}

.category-amount.minus {
    color: var(--danger-color);
}

/* Responsive styles */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .transaction-section {
        grid-column: 1;
        grid-row: auto;
    }
    
    .form-section {
        grid-column: 1;
    }
    
    .analytics-section {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 15px;
        padding: 15px;
    }
    
    .app-title h1 {
        font-size: 2rem;
    }
    
    .total-balance p {
        font-size: 2.2rem;
    }
    
    .inc-exp-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .inc-exp-container div:first-of-type {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.transactions li {
    animation: fadeIn 0.3s ease forwards;
}