/* static/style.css */

/* =========================
   RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Inter',sans-serif;
    background:#0f172a;
    color:white;
    overflow-x:hidden;
}



/* =========================
   BACKGROUND BLUR
========================= */
body {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
}

.bg-blur{
    position:fixed;
    border-radius:50%;
    filter:blur(120px);
    z-index:-1;
}

.blur1{
    width:350px;
    height:350px;
    background:#2563eb;
    top:-100px;
    left:-100px;
    opacity:0.35;
}

.blur2{
    width:350px;
    height:350px;
    background:#9333ea;
    bottom:-100px;
    right:-100px;
    opacity:0.30;
}

/* =========================
   NAVBAR
========================= */

.navbar{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:22px 8%;
    position:sticky;
    top:0;
    z-index:999;
    backdrop-filter:blur(18px);
    background:rgba(15,23,42,0.6);
    border-bottom:1px solid rgba(255,255,255,0.06);
}

.logo{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:22px;
    font-weight:800;
}

.logo-icon{
    font-size:28px;
}

.nav-links{
    display:flex;
    gap:28px;
    list-style:none;
}

.nav-links a{
    text-decoration:none;
    color:#cbd5e1;
    font-weight:500;
    transition:0.3s;
}

.nav-links a:hover{
    color:white;
}

/* =========================
   HERO
========================= */

.hero{
    min-height:92vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:100px 20px;
}

.hero-badge{
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.1);
    padding:12px 22px;
    border-radius:999px;
    margin-bottom:28px;
    color:#cbd5e1;
    backdrop-filter:blur(10px);
}

.hero h1{
    font-size:72px;
    line-height:1.1;
    font-weight:800;
    max-width:1000px;
    margin-bottom:24px;
}

.hero p{
    max-width:760px;
    font-size:18px;
    line-height:1.8;
    color:#cbd5e1;
    margin-bottom:40px;
}

.hero-buttons{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
}

.primary-btn{
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    padding:16px 34px;
    border-radius:14px;
    text-decoration:none;
    color:white;
    font-weight:700;
    transition:0.3s;
    box-shadow:0 10px 30px rgba(37,99,235,0.35);
}

.primary-btn:hover{
    transform:translateY(-4px);
}

.secondary-btn{
    padding:16px 34px;
    border-radius:14px;
    text-decoration:none;
    color:white;
    font-weight:600;
    border:1px solid rgba(255,255,255,0.15);
    backdrop-filter:blur(10px);
    transition:0.3s;
}

.secondary-btn:hover{
    background:rgba(255,255,255,0.08);
}

/* =========================
   CHECKER
========================= */

.checker-section{
    padding:40px 20px 100px;
}

.checker-card{
    max-width:1000px;
    margin:auto;
    padding:45px;
    border-radius:28px;
    background:rgba(255,255,255,0.06);
    backdrop-filter:blur(20px);
    border:1px solid rgba(255,255,255,0.08);
}

.checker-header{
    text-align:center;
    margin-bottom:35px;
}

.checker-header h2{
    font-size:38px;
    margin-bottom:10px;
}

.checker-header p{
    color:#cbd5e1;
}

.checker-form{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.input-wrapper{
    flex:1;
    display:flex;
    align-items:center;
    background:#111827;
    border:1px solid rgba(255,255,255,0.08);
    border-radius:18px;
    padding:0 18px;
}

.input-icon{
    margin-right:10px;
    font-size:18px;
}

.input-wrapper input{
    width:100%;
    background:transparent;
    border:none;
    outline:none;
    color:white;
    padding:18px 0;
    font-size:16px;
}

.analyze-btn{
    border:none;
    padding:18px 30px;
    border-radius:18px;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    color:white;
    font-weight:700;
    cursor:pointer;
    transition:0.3s;
}

.analyze-btn:hover{
    transform:translateY(-3px);
}

.container {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    z-index: 9999;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;

    border: 5px solid #ccc;
    border-top: 5px solid #00bfff;

    border-radius: 50%;

    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.alert{
    position: relative;
    margin: 20px 0;
    padding: 18px 22px;

    border-radius: 18px;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    font-weight: 500;
    font-size: 15px;
    line-height: 1.6;

    animation: slideDown .4s ease;

    display: flex;
    align-items: center;
    gap: 12px;

    overflow: hidden;
}

.alert::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:5px;
    height:100%;
}

/* ERROR */
.alert-danger{
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    color: #fecaca;
    box-shadow:
        0 8px 32px rgba(239,68,68,0.15),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.alert-danger::before{
    background:#ef4444;
}

.alert-danger::after{
    content:"⚠️";
    font-size:22px;
}

/* SUCCESS */
.alert-success{
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.25);
    color: #bbf7d0;
}

.alert-success::before{
    background:#22c55e;
}

.alert-success::after{
    content:"✅";
    font-size:22px;
}

/* WARNING */
.alert-warning{
    background: rgba(250,204,21,0.12);
    border: 1px solid rgba(250,204,21,0.25);
    color: #fde68a;
}

.alert-warning::before{
    background:#facc15;
}

.alert-warning::after{
    content:"⚠️";
    font-size:22px;
}

@keyframes slideDown{
    from{
        opacity:0;
        transform:translateY(-15px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =========================
   RESULT
========================= */

.result-container{
    margin-top:45px;
}

.result-card{
    max-width:1000px;
    margin:auto;
    padding:50px;
    border-radius:28px;
    text-align:center;
    backdrop-filter:blur(20px);
    border:1px solid rgba(255,255,255,0.08);
}

.result-card.safe{
    background:rgba(34,197,94,0.12);
}

.result-card.warning{
    background:rgba(245,158,11,0.12);
}

.result-card.danger{
    background:rgba(239,68,68,0.12);
}

.result-icon{
    font-size:60px;
    margin-bottom:20px;
}

.result-card h1{
    font-size:42px;
    margin-bottom:18px;
}

.result-desc{
    color:#d1d5db;
    line-height:1.8;
    max-width:700px;
    margin:auto;
}

.risk-section{
    margin-top:35px;
}

.risk-top{
    display:flex;
    justify-content:space-between;
    margin-bottom:10px;
    font-weight:600;
}

.progress-bar{
    width:100%;
    height:18px;
    background:rgba(255,255,255,0.08);
    border-radius:999px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg,#22c55e,#facc15,#ef4444);
}

.url-box{
    margin-top:30px;
    background:rgba(255,255,255,0.06);
    padding:20px;
    border-radius:18px;
    word-break:break-all;
    line-height:1.8;
}

.detail-btn{
    margin-top:30px;
    padding:16px 30px;
    border:none;
    border-radius:14px;
    background:white;
    color:black;
    font-weight:700;
    cursor:pointer;
    transition:0.3s;
}

.detail-btn:hover{
    transform:translateY(-3px);
}

/* =========================
   THREAT LEVEL
========================= */

.threat-level{
    display:flex;
    justify-content:center;
    margin-top:20px;
}

.threat-badge{
    display:inline-flex;
    align-items:center;
    gap:10px;

    padding:12px 24px;

    border-radius:999px;

    background:rgba(255,255,255,0.06);
    backdrop-filter:blur(20px);

    font-size:15px;
    font-weight:700;
    letter-spacing:0.5px;

    transition:all 0.3s ease;
}

.threat-badge:hover{
    transform:translateY(-2px) scale(1.02);
}

.url-structure-card{
    margin-top:20px;
    padding:20px;
    border-radius:16px;
    background:#1f2937;
}

.url-structure-card h3{
    margin-bottom:15px;
}

.structure-item{
    display:flex;
    justify-content:space-between;
    padding:12px 0;
    border-bottom:1px solid rgba(255,255,255,0.1);
    gap:20px;
}

.structure-item:last-child{
    border-bottom:none;
}

.structure-item .label{
    font-weight:600;
}

.structure-item span:last-child{
    word-break:break-all;
    text-align:right;
}

/* =========================
   DETAIL
========================= */

.detail-box{
    display:none;
    max-width:1000px;
    margin:40px auto 0;
}

.detail-card{
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.08);
    backdrop-filter:blur(20px);
    padding:35px;
    border-radius:24px;
    margin-bottom:25px;
}

.detail-card h3{
    margin-bottom:25px;
    font-size:24px;
}

.grid-info{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:20px;
}

.info-item{
    background:rgba(255,255,255,0.05);
    padding:20px;
    border-radius:16px;
}

.info-item span{
    display:block;
    margin-bottom:8px;
    color:#cbd5e1;
}

.summary-box{
    line-height:1.9;
    color:#e2e8f0;
}

.explanation-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.explanation-item{
    background:rgba(255,255,255,0.05);
    padding:18px;
    border-radius:16px;
    line-height:1.7;
}

.explanation-grid{
    display:grid;
    gap:15px;
}


.history-section{
    max-width:1100px;
    margin:40px auto;
    padding:0 20px;
}

.history-box{
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:22px;
    padding:30px;
    backdrop-filter:blur(20px);
}

.history-box h3{
    color:white;
    margin-bottom:20px;
}

.history-item{
    padding:15px;
    margin-bottom:15px;
    border-radius:15px;
    background:rgba(255,255,255,0.05);
}

.history-item p{
    color:white;
    margin:5px 0;
    word-break:break-word;
}

.history-item small{
    color:#94a3b8;
}

.history-box button{
    margin-top:15px;
}

/* =========================
   INFO
========================= */

.info-section{
    padding:40px 20px 100px;
}

.info-card{
    max-width:1000px;
    margin:auto;
    padding:60px;
    border-radius:28px;
    text-align:center;
    background:linear-gradient(
        135deg,
        rgba(37,99,235,0.18),
        rgba(124,58,237,0.18)
    );
    border:1px solid rgba(255,255,255,0.08);
}

.info-card h2{
    font-size:42px;
    margin-bottom:20px;
}

.info-card p{
    color:#d1d5db;
    line-height:1.9;
}

/* =========================
   HISTORY
========================= */

.history-container {
    margin-top: 40px;
    width: 100%;
}

.history-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.history-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);

    padding: 18px;
    border-radius: 14px;

    margin-bottom: 15px;

    backdrop-filter: blur(10px);

    transition: 0.3s;
}

.history-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.12);
}

.history-url {
    color: white;
    font-size: 15px;

    word-break: break-word;

    margin-bottom: 10px;
}

.history-result {
    display: inline-block;

    padding: 7px 14px;

    border-radius: 30px;

    font-size: 14px;
    font-weight: bold;
}

.safe {
    background: rgba(34,197,94,0.2);
    color: #4ade80;
}

.warning {
    background: rgba(250,204,21,0.2);
    color: #facc15;
}

.danger {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}

/* =========================
   FAQ (IMPROVED PREMIUM STYLE)
========================= */

.faq-section{
    padding:60px 20px 120px;
}

.faq-header{
    text-align:center;
    margin-bottom:50px;
}

.faq-header h2{
    font-size:42px;
    margin-bottom:12px;
    font-weight:800;
    background: linear-gradient(135deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-header p{
    color:#cbd5e1;
}

/* container */
.faq-container{
    max-width:900px;
    margin:auto;
    display:flex;
    flex-direction:column;
    gap:16px;
}

/* item */
.faq-item{
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:18px;
    overflow:hidden;
    transition:0.3s ease;
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* hover effect */
.faq-item:hover{
    transform: translateY(-3px);
    background: rgba(255,255,255,0.08);
}

/* question */
.faq-question{
    padding:22px 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    cursor:pointer;
    font-weight:600;
    font-size:16px;
    color:#f1f5f9;
    transition:0.3s;
}

/* plus icon animation */
.faq-question::after{
    content:"+";
    font-size:22px;
    color:#a5b4fc;
    transition:0.3s ease;
}

/* active state */
.faq-item.active .faq-question::after{
    content:"−";
    transform: rotate(180deg);
}

/* answer */
.faq-answer{
    max-height:0;
    overflow:hidden;
    padding:0 24px;
    color:#cbd5e1;
    line-height:1.8;
    font-size:14px;

    transition: all 0.35s ease;
}

/* expanded */
.faq-item.active .faq-answer{
    max-height:300px;
    padding:0 24px 22px;
}

/* =========================
   FOOTER
========================= */

footer{
    text-align:center;
    padding:35px 20px;
    color:#94a3b8;
    border-top:1px solid rgba(255,255,255,0.06);
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

    .hero h1{
        font-size:48px;
    }

    .checker-form{
        flex-direction:column;
    }

    .analyze-btn{
        width:100%;
    }

    .nav-links{
        display:none;
    }

    .checker-card,
    .result-card,
    .detail-card,
    .info-card{
        padding:28px;
    }

}

/* =========================
   MOBILE RESPONSIVE
========================= */

@media screen and (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    /* NAVBAR */
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* HERO */
    .hero {
        padding: 120px 20px 80px;
        text-align: center;
    }

    .hero h1 {
        font-size: 38px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.7;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* CHECKER */
    .checker-section {
        padding: 20px;
    }

    .checker-card {
        padding: 25px;
    }

    .checker-header h2 {
        font-size: 24px;
    }

    .checker-form {
        flex-direction: column;
        gap: 15px;
    }

    .input-wrapper {
        width: 100%;
    }

    .input-wrapper input {
        width: 100%;
        font-size: 14px;
    }

    .analyze-btn {
        width: 100%;
    }

    /* RESULT */
    .result-card {
        padding: 25px;
    }

    .result-card h1 {
        font-size: 28px;
    }

    .result-desc {
        font-size: 14px;
    }

    /* URL BOX */
    .url-box {
        overflow-x: auto;
        word-break: break-word;
        font-size: 13px;
    }

    /* GRID INFO */
    .grid-info {
        grid-template-columns: 1fr;
    }

    /* DETAIL */
    .detail-box {
        padding: 20px;
    }

    .detail-card {
        padding: 20px;
    }

    /* HISTORY */
    .history-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .history-url {
        word-break: break-word;
    }

    /* FAQ */
    .faq-section {
        padding: 30px 20px;
    }

    .faq-question {
        font-size: 15px;
    }

    .faq-answer {
        font-size: 14px;
        line-height: 1.6;
    }

    /* FOOTER */
    footer {
        text-align: center;
        padding: 20px;
        font-size: 13px;
    }

}