/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    background:linear-gradient(135deg,#dff6e4,#eefaf2,#f7fff9);
    min-height:100vh;
    padding:40px 20px;
}

/* ===============================
   Calculator Container
================================= */

.calculator-container{
    max-width:1100px;
    margin:auto;
    background:rgba(255,255,255,.9);
    backdrop-filter:blur(12px);
    border-radius:20px;
    padding:40px;
    box-shadow:0 20px 50px rgba(0,0,0,.12);
    border:1px solid rgba(255,255,255,.4);
}

/* ===============================
   Heading
================================= */

h2{
    text-align:center;
    font-size:36px;
    color:#116530;
    margin-bottom:8px;
}

.subtitle{
    text-align:center;
    font-size:16px;
    color:#666;
    margin-bottom:35px;
}

/* ===============================
   Cards
================================= */

.cards-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
    max-height:520px;
    overflow-y:auto;
    padding:10px;
}

/* Scrollbar */

.cards-grid::-webkit-scrollbar{
    width:8px;
}

.cards-grid::-webkit-scrollbar-thumb{
    background:#2ecc71;
    border-radius:20px;
}

.cards-grid::-webkit-scrollbar-track{
    background:#ecf0f1;
}

/* ===============================
   Card
================================= */

.card{
    background:#fff;
    border-radius:18px;
    padding:20px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:.35s;
    border:1px solid #eef1f4;
}

.card:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 35px rgba(0,0,0,.15);
}

.card label{
    display:block;
    font-size:15px;
    font-weight:600;
    color:#2d3436;
    margin-bottom:12px;
}

/* Inputs */

.card-inputs{
    display:flex;
    gap:10px;
}

.card input{
    flex:1;
    padding:12px;
    border-radius:10px;
    border:1px solid #d8dee6;
    outline:none;
    font-size:14px;
    transition:.3s;
}

.card input:focus{
    border-color:#27ae60;
    box-shadow:0 0 0 4px rgba(39,174,96,.15);
}

/* Card Button */

.card button{
    background:linear-gradient(135deg,#27ae60,#2ecc71);
    color:#fff;
    border:none;
    padding:12px 15px;
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
    transition:.3s;
    white-space:nowrap;
}

.card button:hover{
    transform:scale(1.05);
    box-shadow:0 10px 20px rgba(39,174,96,.35);
}

/* ===============================
   Calculate Button
================================= */

.total-btn{
    margin-top:30px;
    width:100%;
    padding:18px;
    font-size:18px;
    font-weight:600;
    color:#fff;
    border:none;
    border-radius:14px;
    cursor:pointer;
    background:linear-gradient(135deg,#11998e,#38ef7d);
    transition:.3s;
}

.total-btn:hover{
    transform:translateY(-3px);
    box-shadow:0 15px 25px rgba(17,153,142,.35);
}

/* ===============================
   Result Box
================================= */

.result-box{
    margin-top:35px;
    background:linear-gradient(135deg,#f4fff7,#e4f9ec);
    border-left:6px solid #2ecc71;
    padding:25px;
    border-radius:16px;
    box-shadow:0 10px 25px rgba(46,204,113,.15);
}

.result-box h3{
    color:#116530;
    font-size:24px;
    margin-bottom:15px;
}

.result-box ul{
    list-style:none;
    padding:0;
}

.result-box li{
    margin:12px 0;
    font-size:16px;
    color:#444;
    display:flex;
    align-items:center;
}

.result-box li::before{
    content:"🌿";
    margin-right:10px;
    font-size:18px;
}

/* ===============================
   Summary & Chart
================================= */

.summary-container {
    margin-top: 30px;
    padding: 25px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0px 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.summary-container h2 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.summary-container p {
    color: #666;
}

#carbonChart {
    max-width: 400px;
    max-height: 400px;
    margin: 20px auto;
}

/* ===============================
   Responsive
================================= */

@media(max-width:768px){
    .calculator-container{
        padding:25px;
    }

    h2{
        font-size:28px;
    }

    .card-inputs{
        flex-direction:column;
    }

    .card button{
        width:100%;
    }

    .total-btn{
        font-size:16px;
    }
}