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

body{
    font-family: sans-serif;
    margin: 0;
    padding: 1rem;
    background: linear-gradient(135deg, #6457c7, #ec69af, #ffa07a);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    min-height: 100vh;
}

.calculator{
    max-width: 400px;
    width: 100%;
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.display{
    font-size: 2rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: right;
    background: #fefefe;
    height: 60px;
}

.buttons{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.buttons button{
    padding: 1rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    background: #eee;
    cursor: pointer;
}

.buttons button.operator{
    background: #ffd966;
}

.buttons button.equal{
    background:#85e085
}

.buttons button.clear{
    background: #f08080;
}

.history{
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
    background: #fff;
    padding: 0.5rem;
    border-radius: 5px;
}

.history-entry{
    padding: 0.3rem 0;
    border-bottom: 1px solid #ddd;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.page-header {
    text-align: center;
    padding: 3rem 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #4158d0 0%, #c850c0 46%, #ffcc70 100%);
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.page-header h1 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    letter-spacing: -0.5px;
    animation: slideIn 0.6s ease-out;
    position: relative;
}

.page-header .lead {
    font-size: 1.1rem;
    opacity: 0.9;
    animation: slideIn 0.6s ease-out 0.2s both;
    position: relative;
    margin-bottom: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease;
    animation: fadeIn 0.6s ease-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.summary-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-left: 4px solid #1e88e5;
}

.transaction-form {
    background: white;
    border-radius: 12px;
}

.filters-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    animation: fadeIn 0.6s ease-out;
}

.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

.table tr {
    transition: transform 0.2s ease;
}

.table tr:hover {
    transform: scale(1.01);
    background-color: #f8f9fa;
}

.badge {
    padding: 0.5em 1em;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

.btn-primary {
    background: #6457c7;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #5346b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 87, 199, 0.4);
}

.btn-info {
    background: #03a9f4;
    border: none;
    color: white;
}

.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255,255,255,0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.4s ease;
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
}

.container {
    animation: fadeIn 0.8s ease-out;
}

input.form-control, select.form-select {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
}

input.form-control:focus, select.form-select:focus {
    box-shadow: 0 0 0 2px rgba(100, 87, 199, 0.2);
    border-color: #6457c7;
}

.stats-card {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stats-card h6 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stats-card h3 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.chart-container {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    min-height: 300px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .stats-card {
        text-align: center;
    }
    
    .chart-container {
        min-height: 250px;
    }
}

@media (max-width: 576px) {
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .stats-card h3 {
        font-size: 1.2rem;
    }
}

/* Utility classes */
.w-md-auto {
    width: auto !important;
}

@media (min-width: 768px) {
    .text-md-start {
        text-align: left !important;
    }
    
    .p-md-4 {
        padding: 1.5rem !important;
    }
}