:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    /* Glass base */
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    /* Azul Celeste */
    --accent-glow: rgba(56, 189, 248, 0.3);
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --backdrop-blur: blur(10px);
    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.05) 0%, transparent 20%);
}

.container {
    width: 100%;
    max-width: 450px;
    margin: 30px auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.inc-exp-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 30px;
}

.inc-exp-container>div {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.inc-exp-container h4 {
    margin: 0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.money {
    font-size: 1.1rem;
    font-weight: 600;
}

.participants-card h4 {
    color: var(--text-color);
    font-size: 1rem;
}

.money.plus {
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

.money.minus {
    color: var(--danger-color);
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.total-card {
    grid-column: span 2;
    /* If grid */
}

/* Optional: Icon background decoration */
.icon-bg {
    position: absolute;
    bottom: -10px;
    right: -5px;
    font-size: 4rem;
    opacity: 0.05;
    color: #fff;
    pointer-events: none;
}

h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin: 40px 0 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Filters */
.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.filter-container h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.filter-controls select {
    padding: 8px 12px;
    font-size: 14px;
    width: auto;
}

/* Form Styles */
.form-control {
    margin: 15px 0;
}

label {
    display: inline-block;
    margin: 10px 0 5px;
    font-size: 0.9rem;
    color: #94a3b8;
}

input,
select {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: block;
    font-family: inherit;
    font-size: 16px;
    padding: 12px;
    width: 100%;
    color: #fff;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.btn {
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    box-shadow: 0 4px 15px var(--accent-glow);
    color: #fff;
    border: 0;
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 30px;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.btn:active {
    transform: scale(0.98);
}

/* List Styles */
.list {
    list-style-type: none;
}

.list li {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
}

.trans-info {
    display: flex;
    flex-direction: column;
}

.trans-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.trans-text {
    font-weight: 500;
}

.list li:hover {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.list li.plus {
    border-left: 5px solid var(--success-color);
}

.list li.minus {
    border-left: 5px solid var(--danger-color);
}

.delete-btn {
    cursor: pointer;
    background-color: var(--danger-color);
    border: 0;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    padding: 5px 10px;
    position: absolute;
    top: 50%;
    right: 10px;
    /* Moved slightly inside */
    transform: translate(100%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 4px;
}

.list li:hover .delete-btn {
    opacity: 1;
    transform: translate(0, -50%);
}

/* Mobile First Adjustments */
@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 10px;
    }

    .inc-exp-container {
        flex-direction: row;
        /* Keep row even on smaller screens ideally, or stack */
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
