@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
    font-family: 'Orbitron', sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

/* Grid futurista de fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 0, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* Gradiente radial de fondo */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1), transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 950px;
    width: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 30, 0.95), rgba(30, 10, 30, 0.95));
    border: 2px solid transparent;
    background-clip: padding-box;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.3);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid;
    border-image: linear-gradient(135deg, #00ffff, #ff00ff, #00ffff) 1;
    pointer-events: none;
    animation: border-glow 3s linear infinite;
}

@keyframes border-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
}

/* HEADER */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 900;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s linear infinite;
    text-transform: uppercase;
    letter-spacing: 5px;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.7));
}

@keyframes gradient-shift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.header .subtitle {
    margin-top: 15px;
    font-size: 0.9em;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.8;
}

/* INPUT */
.input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.input-label {
    display: block;
    margin-bottom: 10px;
    color: #00ffff;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.url-input {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.url-input:focus {
    border-color: #ff00ff;
    box-shadow: 
        inset 0 0 20px rgba(255, 0, 255, 0.2),
        0 0 30px rgba(255, 0, 255, 0.4);
}

.url-input::placeholder {
    color: rgba(0, 255, 255, 0.3);
}

/* BOTÓN */
.btn-analyze {
    width: 100%;
    padding: 22px;
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border: none;
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.4);
}

.btn-analyze:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 255, 255, 0.6);
}

.btn-analyze:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-analyze::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* LOADER DE ESCANEO */
.scanning-loader {
    display: none;
    margin-top: 30px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ffff;
    text-align: center;
}

.scanning-loader.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.scan-animation {
    position: relative;
}

.scan-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: scan-move 2s linear infinite;
    margin-bottom: 20px;
}

@keyframes scan-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.scan-text {
    font-size: 1.5em;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    letter-spacing: 3px;
}

.dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* RESULTADOS */
.result-section {
    margin-top: 50px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ffff;
    display: none;
    position: relative;
}

.result-section.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* NIVEL DE AMENAZA */
.threat-level {
    text-align: center;
    padding: 30px;
    margin-bottom: 40px;
    font-size: 2em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    clip-path: polygon(10% 0%, 90% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 90%, 0% 10%);
}

.threat-low {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 200, 0, 0.2));
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00;
    border: 2px solid #00ff00;
}

.threat-medium {
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.2), rgba(255, 200, 0, 0.2));
    color: #ffff00;
    text-shadow: 0 0 20px #ffff00;
    border: 2px solid #ffff00;
}

.threat-high {
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.2), rgba(255, 50, 0, 0.2));
    color: #ff6600;
    text-shadow: 0 0 20px #ff6600;
    border: 2px solid #ff6600;
}

.threat-critical {
    background: linear-gradient(135deg, rgba(255, 0, 100, 0.3), rgba(200, 0, 100, 0.3));
    color: #ff0066;
    text-shadow: 0 0 30px #ff0066;
    border: 2px solid #ff0066;
    animation: critical-alert 0.5s infinite alternate;
}

@keyframes critical-alert {
    from { box-shadow: 0 0 30px rgba(255, 0, 102, 0.6); }
    to { box-shadow: 0 0 60px rgba(255, 0, 102, 1); }
}

/* PUNTUACIÓN DE RIESGO */
.risk-score {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.score-label {
    font-size: 0.9em;
    color: #00ffff;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.score-value {
    font-size: 4em;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    position: relative;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff6600, #ff0066);
    width: 0%;
    transition: width 1s ease-out;
    position: relative;
}

.score-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: score-shine 2s infinite;
}

@keyframes score-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* URL ANALIZADA */
.analyzed-url {
    margin-bottom: 30px;
}

.url-display {
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-left: 4px solid #00ffff;
    font-family: monospace;
    font-size: 1.1em;
    word-break: break-all;
    color: #00ffff;
}

/* DETALLES */
.detail-title {
    color: #00ffff;
    font-size: 1.2em;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.detail-list {
    list-style: none;
}

.detail-item {
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
    border-left: 4px solid #ff00ff;
    font-size: 0.95em;
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '▸';
    position: absolute;
    left: -20px;
    color: #ff00ff;
    font-size: 1.5em;
    animation: arrow-move 1s ease-in-out infinite;
}

@keyframes arrow-move {
    0%, 100% { left: 5px; }
    50% { left: 10px; }
}

.detail-item .char {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 0, 100, 0.3);
    border: 2px solid #ff0066;
    color: #ff0066;
    font-weight: bold;
    margin: 0 8px;
    box-shadow: 0 0 15px rgba(255, 0, 100, 0.5);
    font-family: monospace;
    font-size: 1.2em;
}

.detail-item .normal-char {
    color: #00ffff;
    font-weight: bold;
    font-family: monospace;
}

.detail-item .position {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
}

.detail-item .threat-type {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 102, 0, 0.2);
    border: 1px solid #ff6600;
    color: #ff6600;
    font-size: 0.8em;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RESUMEN DE SEGURIDAD */
.security-summary {
    margin-top: 30px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.summary-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.summary-content strong {
    color: #00ffff;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .threat-level {
        font-size: 1.3em;
        padding: 20px;
    }
    
    .score-value {
        font-size: 3em;
    }
}