@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.2/font/bootstrap-icons.css");

:root{
    --box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    list-style: none;
}

body{
    background-color: #082032;
    color: #E0E0E0;
}
h3{
    text-align: center;
    margin-bottom: 15px;
    text-decoration: underline solid #393E46 3px;
    font-size: 24px;
    
}


.outer-wrap{
    width: 100%;
    min-height: 100vh;
    background-color: #121212;
    padding: 30px;
}

.inner-wrap{
    max-width: 1200px;
    margin: auto;
    background-color: #1E1E1E;
}

.heading {
    margin: 30px auto;
    padding: 0 20px;
}

.heading .title{
    font-size: 30px;
    color: #E0E0E0;
    font-weight: 500;
    text-align: center;
}

.heading .subtitle{
    font-size: 20px;
    color: #B0B0B0;
    font-weight: 300;
    text-align: center;
}

.transaction-control{
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px auto;
}

.actions, .stats{
    flex-grow: 1;
    background-color:#2e3530;
    padding: 20px;
    box-shadow: var(--box-shadow);
    border-radius: 5px;
    margin: 0 10px;
}

.actions .add{
    display: flex;
    flex-direction: column;
    margin: 10px;
}

.actions .add input{
    font-size: 18px;
    padding: 1rem 1.5rem;
    margin: 10px;
}

.actions .add input[type="submit"]{
    padding: 7px 15px;
    border-radius: 5px;
    border: 0;
    background-color: #4CAF50;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: var(--box-shadow);
}

.stats p{
    background-color: #bed7ff;
    margin: 20px 10px;
    padding: 10px 20px;
    box-shadow: var(--box-shadow);
    font-size: 18px;
    border-radius: 2px;
    text-align: center;
}
.warning-source,.warning-amount{
    color: red;
}
.stats{
    color: white;
}
.stats p.balance{
    background-color: rgba(255, 81, 0, 0.849);
    border-right: 10px solid #F6C065;
}

.stats p.income{
    background-color: #3ec978ad;
    border-right: 10px solid #16c77a;
}

.stats p.expense{
    background-color: #d14c5bbb;
    border-right: 10px solid #EB596E;
}

.stats p span{
    font-size: 18px;
}

.transaction-history{
    margin: 40px 10px;
    background-color: #2e3530;
    border-radius: 10px;
    padding: 30px 0;
    box-shadow: var(--box-shadow);
}

.records{
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px;
}

.records div{
    flex-grow: 1;
    padding: 10px;
}

.records li{
    display: flex;
    justify-content: space-between;
    background-color: #1E1E1E;
    padding: 10px;
    margin: 12px 0;
    min-width: 250px;
    box-shadow: var(--box-shadow);
    font-size: 18px;
}

.records .income li{
    border-left: 10px solid #66BB6A;
    color: rgb(127, 233, 127);
}

.records .expense li{
    border-left: 10px solid #DF5E5E;
    color: rgb(250, 39, 39);

}

.records li p:first-child{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
   
}
.bi-arrow-up-square-fill,.bi-arrow-down-square-fill{
    margin-right: 15px;
}
.records span{
    font-size: 18px;
}

.records span#time{
    color: #717171;
    font-size: 12px;
}

.records i.delete{
    margin-left: 15px;
    color: rgb(224, 93, 93);
    cursor: pointer;
    font-size: 18px;
}

.records i.delete:hover{
    color: #ed361a;
}
.expense-add{
    color: #B42B51;
}
/* Existing CSS remains the same until the end, then add these media queries */

/* Medium devices (tablets, 768px and below) */
@media only screen and (max-width: 768px) {
    .outer-wrap {
        padding: 20px;
    }

    .heading {
        margin: 20px auto;
    }

    .heading .title {
        font-size: 26px;
    }

    .heading .subtitle {
        font-size: 18px;
    }

    .transaction-control {
        flex-direction: column;
        gap: 20px;
    }

    .actions, .stats {
        margin: 0;
        width: 100%;
    }

    .transaction-history {
        margin: 30px 0;
        padding: 20px 0;
    }

    .records {
        flex-direction: column;
        gap: 15px;
    }

    .records div {
        width: 100%;
    }

    h3 {
        font-size: 22px;
    }
}
li.income-list{
background-color: #082032;}

/* Small devices (phones, 576px and below) */
@media only screen and (max-width: 576px) {
    .outer-wrap {
        padding: 15px;
    }

    .heading .title {
        font-size: 24px;
    }

    .heading .subtitle {
        font-size: 16px;
    }

    .actions .add input,
    .actions .add input[type="submit"],
    .stats p,
    .records li,
    .records span {
        font-size: 16px;
    }

    .actions .add input {
        margin: 8px 0;
    }

    .stats p {
        margin: 15px 0;
        padding: 8px 15px;
    }

    .records li {
        padding: 8px;
        margin: 10px 0;
        min-width: auto;
    }

    .records i.delete {
        margin-left: 10px;
        font-size: 16px;
    }
}
.add-income-expense{
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}
#add-expense{
    background-color: red;
}
/* Extra small devices (phones, 400px and below) */
@media only screen and (max-width: 400px) {
    .heading .title {
        font-size: 22px;
    }

    .heading .subtitle {
        font-size: 15px;
    }

    h3 {
        font-size: 20px;
    }

    .actions, .stats {
        padding: 15px;
    }

    .transaction-history {
        padding: 15px 0;
    }

    .records {
        margin: 15px 10px;
    }
}
