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

/* Background */
body {
    font-family: 'Segoe UI', sans-serif;
    color: white;
    text-align: center;

    /* Fallback gradient for fast initial load */
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a52 50%, #162c3e 100%);
    background-image: url('assets/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    
    height: 100vh;
    overflow: hidden;
    will-change: background;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    filter: brightness(0.95) saturate(1.1);
}

/* Unified dark overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 0;
    pointer-events: none;
}

/* Canvas */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Container */
.container {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    max-width: 500px;
    margin: auto;
    padding: 30px;

    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(50px) brightness(1.1);
    -webkit-backdrop-filter: blur(50px) brightness(1.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1), inset 0 0 32px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease-out;
    will-change: transform;
    z-index: 1;
}

/* Title */
.title {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Subtitle */
.subtitle {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #00ffcc;
}

/* Instruction */
.instruction {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Input */
input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

/* Button */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #00ffcc;
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 255, 204, 0.2);
    will-change: transform, box-shadow;
}

button:hover {
    background: #00ccaa;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 255, 204, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 255, 204, 0.2);
}

/* Result */
.result {
    margin-top: 15px;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: color;
}

/* Status colors */
.checking {
    color: white;
}

.safe {
    color: limegreen;
}

.phishing {
    color: red;
}

/* Source */
.source {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #ccc;
}

/* Progress bar */
.progress {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    margin-top: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

#progressBar {
    width: 0%;
    height: 100%;
    background: #00ffcc;
    transition: width 0.4s ease;
}

/* AI status */
.ai-status {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #00ffcc;
}