:root {
    --bg-color: #0a0f1d;
    --card-bg: #131c32;
    --neon-cyan: #00f0ff;
    --neon-green: #39ff14;
    --neon-red: #ff3131;
    --text-main: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logo {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.highlight { color: var(--neon-cyan); }

.status-badge {
    background: rgba(57, 255, 20, 0.1);
    color: var(--neon-green);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid var(--neon-green);
}

/* Scanner & Effet Laser */
.scanner-wrapper {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#reader {
    width: 100% !important;
    background: #000;
    border: none !important;
}

#reader __video {
    object-fit: cover !important;
}

.laser-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, transparent, var(--neon-cyan));
    box-shadow: 0 0 12px var(--neon-cyan);
    animation: scanAnimation 2.5s infinite linear;
    pointer-events: none;
    z-index: 10;
}

@keyframes scanAnimation {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* Historique */
.history-section {
    margin-top: 25px;
}

.history-section h3 {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

#history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #fff;
}

.item-safe { border-left-color: var(--neon-green); }
.item-danger { border-left-color: var(--neon-red); }

/* Modales Plein Écran */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 5, 0.9);
    backdrop-filter: blur(10px);
}

.modal-backdrop-success {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(5, 15, 10, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 440px;
    padding: 35px;
    border-radius: 24px;
    text-align: center;
    z-index: 10;
}

.danger-box {
    background: #1a0a0a;
    border: 2px solid var(--neon-red);
    box-shadow: 0 0 40px rgba(255, 49, 49, 0.3);
}

.success-box {
    background: #0a1a0f;
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.3);
}

.animate-pop {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.alert-icon { font-size: 4rem; animation: pulse 1s infinite alternate; color: var(--neon-red); }
.success-icon { font-size: 4rem; color: var(--neon-green); }

@keyframes pulse {
    from { transform: scale(1); filter: drop-shadow(0 0 2px var(--neon-red)); }
    to { transform: scale(1.1); filter: drop-shadow(0 0 15px var(--neon-red)); }
}

.url-display {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    word-break: break-all;
    margin: 20px 0;
    font-size: 0.9rem;
}

/* Barres de Score */
.security-score-box {
    margin: 15px 0;
    font-size: 0.85rem;
}

.score-bar-container {
    background: rgba(255,255,255,0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
}

.score-bar {
    height: 100%;
    width: 0%;
    transition: width 1s ease-out;
}

.danger-box .score-bar { background: var(--neon-red); }
.success-box .score-bar { background: var(--neon-green); }

.reason-text {
    font-size: 0.9rem;
    color: #ffb7b7;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

button {
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-secure { background: var(--neon-cyan); color: #000; }
.btn-secure:hover { background: #fff; box-shadow: 0 0 15px var(--neon-cyan); }
.btn-leak { background: transparent; color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.2); }
.btn-leak:hover { color: #fff; background: rgba(255, 49, 49, 0.2); }

.loader-line {
    height: 3px;
    background: var(--neon-green);
    width: 100%;
    animation: loadOut 2s linear forwards;
    margin-top: 20px;
}

@keyframes loadOut {
    from { width: 100%; }
    to { width: 0%; }
}

.hidden { display: none !important; }