@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;
}

body{
    font-family:'Poppins', sans-serif;
    min-height:100vh;
    background:
        radial-gradient(circle at top left, #1e3a8a 0%, transparent 30%),
        radial-gradient(circle at bottom right, #7c3aed 0%, transparent 30%),
        linear-gradient(135deg, #0f172a, #111827);
    padding:40px 20px;
    color:white;
}

.container{
    max-width:1000px;
    margin:auto;
    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(14px);
    border:1px solid rgba(255,255,255,0.1);
    border-radius:30px;
    padding:40px;
    box-shadow:
        0 10px 40px rgba(0,0,0,0.4),
        inset 0 1px 1px rgba(255,255,255,0.1);
}

h1{
    text-align:center;
    font-size:42px;
    font-weight:700;
    margin-bottom:35px;
    background:linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.mode{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-bottom:45px;
    flex-wrap:wrap;
}

.mode button{
    border:none;
    padding:14px 30px;
    border-radius:14px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    color:white;
    background:rgba(255,255,255,0.08);
    transition:0.3s;
    border:1px solid rgba(255,255,255,0.1);
}

.mode button:hover{
    transform:translateY(-3px);
    background:rgba(255,255,255,0.15);
}

.mode button.active{
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    box-shadow:
        0 0 20px rgba(124,58,237,0.5),
        0 0 40px rgba(37,99,235,0.4);
}

.resistor-wrapper{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:45px;
}

.wire{
    width:150px;
    height:10px;
    background:linear-gradient(to bottom,#d1d5db,#6b7280);
    border-radius:20px;
    box-shadow:0 0 10px rgba(255,255,255,0.2);
}

.resistor-body{
    width:380px;
    height:140px;
    background:linear-gradient(to bottom,#f8d9a8,#d89b52);
    border-radius:60px;
    position:relative;
    display:flex;
    justify-content:space-evenly;
    align-items:center;
    padding:0 30px;
    box-shadow:
        inset 0 8px 10px rgba(255,255,255,0.3),
        inset 0 -10px 10px rgba(0,0,0,0.15),
        0 10px 30px rgba(0,0,0,0.35);
}

.resistor-body::before{
    content:'';
    position:absolute;
    inset:10px;
    border-radius:50px;
    border:2px solid rgba(255,255,255,0.15);
}

.band{
    width:24px;
    height:100%;
    border-radius:8px;
    background:black;
    box-shadow:
        inset 0 0 10px rgba(255,255,255,0.2),
        0 0 8px rgba(0,0,0,0.4);
    transition:0.3s;
}

.value-box{
    margin-bottom:40px;
    text-align:center;
}

#result{
    display:inline-block;
    padding:18px 35px;
    border-radius:18px;
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.1);
    font-size:38px;
    font-weight:700;
    letter-spacing:1px;
    color:#f8fafc;
    box-shadow:
        0 0 20px rgba(59,130,246,0.2);
}

.controls{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:25px;
}

.control{
    display:flex;
    flex-direction:column;
}

.control label{
    margin-bottom:10px;
    font-size:15px;
    font-weight:600;
    color:#cbd5e1;
}

.control select{
    padding:14px 16px;
    border:none;
    border-radius:14px;
    font-size:15px;
    font-weight:500;
    background:rgba(255,255,255,0.08);
    color:white;
    outline:none;
    border:1px solid rgba(255,255,255,0.08);
    transition:0.3s;
    backdrop-filter:blur(10px);
}

.control select:focus{
    border-color:#60a5fa;
    box-shadow:
        0 0 15px rgba(96,165,250,0.4);
}

.control select option{
    background:#111827;
    color:white;
}

.hidden{
    display:none;
}

@media(max-width:768px){

    body{
        padding:20px 12px;
    }

    .container{
        padding:25px 18px;
        border-radius:25px;
    }

    h1{
        font-size:28px;
        line-height:1.3;
    }

    .wire{
        width:60px;
        height:8px;
    }

    .resistor-body{
        width:220px;
        height:90px;
        padding:0 15px;
    }

    .band{
        width:14px;
    }

    #result{
        font-size:24px;
        width:100%;
        padding:16px;
    }

    .controls{
        grid-template-columns:1fr;
    }

    .mode button{
        width:100%;
    }

}


.intro{
    margin-bottom:40px;
    padding:28px;
    border-radius:24px;
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 10px 30px rgba(0,0,0,0.15);
}

.intro h2{
    font-size:28px;
    margin-bottom:16px;
    color:#93c5fd;
}

.intro p{
    color:#d1d5db;
    line-height:1.9;
    margin-bottom:14px;
    font-size:15px;
}

.intro p:last-child{
    margin-bottom:0;
}

@media(max-width:768px){

    .intro{
        padding:20px;
    }

    .intro h2{
        font-size:22px;
    }

    .intro p{
        font-size:14px;
        line-height:1.8;
    }

}


/* =========================
   SMD
========================= */

.smd-box{
    margin-top:40px;
    padding:35px;
    border-radius:25px;
    background:rgba(255,255,255,0.05);
    border:1px solid rgba(255,255,255,0.08);
}

.smd-box h2{
    text-align:center;
    margin-bottom:35px;
    font-size:28px;
    color:#93c5fd;
}

.smd-preview{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:35px;
}

.pin{
    width:120px;
    height:10px;
    background:linear-gradient(to bottom,#d1d5db,#6b7280);
    border-radius:20px;
}

.smd-resistor{
    width:220px;
    height:100px;
    background:linear-gradient(135deg,#1f2937,#111827);
    border-radius:18px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 15px;
    border:2px solid rgba(255,255,255,0.08);
    box-shadow:
        inset 0 5px 10px rgba(255,255,255,0.08),
        0 10px 25px rgba(0,0,0,0.35);
}

.smd-resistor span{
    font-size:42px;
    font-weight:700;
    letter-spacing:4px;
    color:#f8fafc;
}

.smd-result{
    text-align:center;
    margin-bottom:35px;
}

.smd-result h3{
    display:inline-block;
    padding:16px 30px;
    border-radius:18px;
    font-size:34px;
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 0 20px rgba(59,130,246,0.2);
}

.smd-controls{
    max-width:400px;
    margin:auto;
}

.smd-controls input{
    width:100%;
    padding:15px 18px;
    border:none;
    border-radius:14px;
    background:rgba(255,255,255,0.08);
    color:white;
    outline:none;
    font-size:16px;
    border:1px solid rgba(255,255,255,0.08);
    transition:0.3s;
}

.smd-controls input:focus{
    border-color:#60a5fa;
    box-shadow:
        0 0 15px rgba(96,165,250,0.35);
}

.smd-controls input::placeholder{
    color:#9ca3af;
}

@media(max-width:768px){

    .smd-box{
        padding:20px;
    }

    .pin{
        width:45px;
        height:8px;
    }

    .smd-resistor{
        width:150px;
        height:70px;
    }

    .smd-resistor span{
        font-size:28px;
    }

    .smd-result h3{
        width:100%;
        font-size:24px;
        padding:14px;
    }

}


/* =========================
   BACKGROUND PAGE
========================= */

body{
    font-family:'Poppins', sans-serif;
    min-height:100vh;
    padding:40px 20px;
    color:white;
}

/* PAGE RESISTOR */
.resistor-page{
    background:
        radial-gradient(circle at top left, #1e3a8a 0%, transparent 30%),
        radial-gradient(circle at bottom right, #7c3aed 0%, transparent 30%),
        linear-gradient(135deg, #0f172a, #111827);
}

/* PAGE SMD */
.resistor-smd-page{
    background:
        radial-gradient(circle at top right, #065f46 0%, transparent 30%),
        radial-gradient(circle at bottom left, #0f766e 0%, transparent 30%),
        linear-gradient(135deg, #052e16, #022c22);
}


/* =========================
   DASHBOARD
========================= */

.dashboard-page{
    background:
        radial-gradient(circle at top left, #0f172a 0%, transparent 35%),
        radial-gradient(circle at bottom right, #1d4ed8 0%, transparent 35%),
        linear-gradient(135deg,#020617,#0f172a);
}

.dashboard-container{
    max-width:1200px;
    margin:auto;
}

.dashboard-header{
    text-align:center;
    margin-bottom:40px;
}

.dashboard-header h1{
    font-size:52px;
    margin-bottom:15px;
}

.dashboard-header p{
    color:#cbd5e1;
    font-size:18px;
    max-width:700px;
    margin:auto;
    line-height:1.8;
}

.search-box{
    max-width:600px;
    margin:0 auto 50px;
    position:relative;
}

.search-box i{
    position:absolute;
    left:20px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
}

.search-box input{
    width:100%;
    padding:18px 20px 18px 55px;
    border:none;
    border-radius:18px;
    background:rgba(255,255,255,0.08);
    color:white;
    font-size:16px;
    outline:none;
    border:1px solid rgba(255,255,255,0.08);
    backdrop-filter:blur(10px);
}

.search-box input:focus{
    border-color:#60a5fa;
    box-shadow:
        0 0 20px rgba(96,165,250,0.25);
}

.component-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:30px;
}

.component-card{
    position:relative;
    padding:35px;
    border-radius:28px;
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.08);
    text-decoration:none;
    color:white;
    transition:0.35s;
    overflow:hidden;
    backdrop-filter:blur(12px);
}

.component-card::before{
    content:'';
    position:absolute;
    width:180px;
    height:180px;
    background:rgba(96,165,250,0.08);
    border-radius:50%;
    top:-80px;
    right:-80px;
}

.component-card:hover{
    transform:translateY(-8px);
    border-color:rgba(96,165,250,0.4);
    box-shadow:
        0 15px 35px rgba(0,0,0,0.35),
        0 0 30px rgba(59,130,246,0.15);
}

.component-card .icon{
    width:75px;
    height:75px;
    border-radius:20px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:25px;
    font-size:30px;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    box-shadow:
        0 10px 25px rgba(37,99,235,0.35);
}

.component-card h2{
    font-size:28px;
    margin-bottom:15px;
}

.component-card p{
    color:#cbd5e1;
    line-height:1.8;
    font-size:15px;
}

.component-card.soon{
    opacity:0.75;
}

.component-card span{
    display:inline-block;
    margin-top:18px;
    padding:8px 16px;
    border-radius:30px;
    font-size:13px;
    font-weight:600;
    background:rgba(255,255,255,0.08);
    color:#93c5fd;
}

@media(max-width:768px){

    .dashboard-header h1{
        font-size:34px;
        line-height:1.3;
    }

    .dashboard-header p{
        font-size:15px;
    }

    .component-card{
        padding:25px;
    }

    .component-card h2{
        font-size:24px;
    }

}