@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

body, html {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    background-color: #020010;
    font-family: 'Share Tech Mono', monospace;
    color: #00d4ff;
    overflow: hidden;
    user-select: none;
}

/* ---------------- MATRIX BACKGROUND ---------------- */
#matrix {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.3;
}

/* ---------------- RAW HEX DUMP BACKGROUND ---------------- */
.hex-bg {
    position: absolute;
    right: 0; top: 0;
    width: 30%; height: 100%;
    overflow: hidden;
    opacity: 0.15;
    font-size: 0.8rem;
    color: #4a2d8f;
    word-wrap: break-word;
    z-index: 0;
    text-align: right;
    padding-right: 15px;
    font-family: monospace;
}

/* ---------------- HIỆU ỨNG MÀN HÌNH CRT CŨ ---------------- */
.crt-effect {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%),
                linear-gradient(90deg, rgba(0, 100, 255, 0.04), rgba(120, 0, 255, 0.02), rgba(0, 200, 255, 0.04));
    background-size: 100% 4px, 6px 100%;
    z-index: 10;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.95);
}

/* ---------------- BẢNG TELEMETRY HUD GÓC TRÁI ---------------- */
.hud {
    position: absolute;
    top: 25px; left: 25px;
    z-index: 5;
    font-size: 0.9rem;
    color: #00d4ff;
    text-shadow: 0 0 5px #00d4ff;
    line-height: 1.6;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 2px solid #5b21b6;
    padding-left: 10px;
}

@media (max-width: 768px) {
    .hud, .hex-bg { display: none !important; }
    .modal { width: 95%; padding: 2px; }
    .modal-inner { padding: 20px 15px; }
    .header-title { font-size: 1.1rem; margin-bottom: 15px; letter-spacing: 1px; }
    .status-row { font-size: 0.95rem; margin-bottom: 8px; }
    .bar-container { height: 16px; margin-bottom: 15px; }
    .terminal { height: 260px; font-size: 0.85rem; line-height: 1.6; }
    .prefix { min-width: 85px; font-size: 0.75rem; margin-right: 8px; }
    .message.hl { font-size: 0.9rem; }
    .shield-icon { font-size: 2.2rem; margin-bottom: 5px; }
    .success-text {
        font-size: 1.15rem;
        letter-spacing: 0px;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    .btn-hack {
        padding: 12px 10px;
        font-size: 0.95rem;
        width: 100%;
        margin: 0 auto 15px auto;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: normal;
    }
    .success-features {
        font-size: 0.75rem;
        line-height: 1.4;
        padding: 12px;
        margin-bottom: 5px;
        text-align: left;
        width: 95%;
    }
    .success-features div { padding-bottom: 6px; }
}

.hud span { color: #e0e0ff; }
.blink-red { color: #ff4fa3 !important; text-shadow: 0 0 10px #ff4fa3 !important; animation: blinkWarning 1s infinite; font-weight: bold;}
@keyframes blinkWarning { 0%, 100% {opacity:1;} 50% {opacity:0;} }

/* ---------------- KHUNG TOOL CHÍNH TRONG SUỐT ---------------- */
.modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 750px;
    background: rgba(2, 0, 20, 0.82);
    border: 1px solid #5b21b6;
    box-shadow: 0 0 40px rgba(0, 180, 255, 0.15), 0 0 80px rgba(120, 0, 255, 0.1), inset 0 0 25px #000;
    backdrop-filter: blur(14px);
    border-radius: 8px;
    z-index: 5;
    padding: 4px;
}

.modal-inner {
    border: 1px dashed #3b1f8c;
    padding: 35px;
    border-radius: 6px;
    position: relative;
}

/* Khung quét ngang màn hình modal */
.scan-bar {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, #00d4ff, #8b5cf6, transparent);
    box-shadow: 0 0 18px #00d4ff, 0 0 35px #8b5cf6;
    animation: scanner 3s infinite linear;
    z-index: 100;
    pointer-events: none;
}
@keyframes scanner {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.header-title {
    font-size: 1.6rem;
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 25px;
    text-transform: uppercase;
    text-shadow: 0 0 10px #00d4ff, 0 0 25px #8b5cf6;
    border-bottom: 2px solid #3b1f8c;
    padding-bottom: 15px;
    font-weight: bold;
    color: #e0f0ff;
}

/* ---------------- THANH PROGRESS & SỐ % ---------------- */
.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.25rem;
    text-shadow: 0 0 5px #00d4ff;
    font-weight: bold;
    color: #a0c8ff;
}

.ip-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -8px 0 22px;
    padding: 14px 16px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.38);
    border-radius: 6px;
    box-shadow: inset 0 0 18px rgba(0, 212, 255, 0.08);
}

.ip-label {
    color: #7ab8ff;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.ip-value {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: right;
    text-shadow: 0 0 10px #00d4ff;
    overflow-wrap: anywhere;
}

.bar-container {
    width: 100%;
    height: 22px;
    background: #08001a;
    border: 1px solid #5b21b6;
    position: relative;
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(0, 180, 255, 0.2), 0 0 30px rgba(120, 0, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1a00ff, #00d4ff, #8b5cf6);
    box-shadow: 0 0 20px #00d4ff, 0 0 40px #8b5cf6;
    position: relative;
    transition: width 0.1s;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 15px,
        rgba(0,0,0,0.3) 15px,
        rgba(0,0,0,0.3) 30px
    );
}

/* ---------------- LOG TERMINAL ---------------- */
.terminal {
    height: 280px;
    overflow-y: hidden;
    font-size: 1.1rem;
    line-height: 1.9;
    position: relative;
    padding-right: 10px;
}

.term-line {
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
}

.prefix {
    color: #4a3a7a;
    margin-right: 15px;
    min-width: 125px;
    font-size: 0.95rem;
    padding-top: 2px;
}

.message {
    color: #7ab8ff;
    flex-grow: 1;
    word-wrap: break-word;
}

.message.hl {
    color: #fff;
    text-shadow: 0 0 10px #00d4ff, 0 0 20px #8b5cf6;
    font-weight: bold;
    font-size: 1.15rem;
}

/* ---------------- MÀN HÌNH THÀNH CÔNG ---------------- */
.success-overlay {
    display: none;
    position: relative;
    width: 100%;
    background: transparent;
    z-index: 200;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeInGlass 0.6s ease-out;
}

@keyframes fadeInGlass {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- LOCK ICON --- */
.shield-icon {
    width: 132px;
    height: 112px;
    margin: 0 auto 12px;
    position: relative;
    filter: drop-shadow(0 0 14px #00d4ff) drop-shadow(0 0 30px #8b5cf6);
    animation: float 2.5s ease-in-out infinite;
}

.unlocked-lock {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.lock-shackle-outline,
.lock-shackle-metal {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translate(23px, -6px);
}

.lock-shackle-outline {
    stroke: #07101e;
    stroke-width: 16;
}

.lock-shackle-metal {
    stroke: url(#lock-metal);
    stroke-width: 10;
}

.lock-body-front {
    fill: url(#lock-gold);
    stroke: #121a28;
    stroke-width: 3;
}

.lock-body-top {
    fill: #e6a000;
    stroke: #121a28;
    stroke-width: 3;
    stroke-linejoin: round;
}

.lock-body-side {
    fill: #b87500;
    stroke: #121a28;
    stroke-width: 3;
    stroke-linejoin: round;
}

.lock-keyhole-head,
.lock-keyhole-stem {
    fill: #101827;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* --- TITLE SPLIT --- */
.success-title-big {
    font-size: 2.2rem;
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255,255,255,0.6), 0 0 20px #8b5cf6, 0 0 40px #8b5cf6;
    line-height: 1.1;
    margin-bottom: 6px;
}

.success-title-sub {
    font-size: 1.05rem;
    color: #00d4ff;
    letter-spacing: 3px;
    text-shadow: 0 0 10px #00d4ff, 0 0 25px #00d4ff;
    margin-bottom: 22px;
    text-transform: uppercase;
}

/* --- FEATURES BOX --- */
.success-features {
    width: 100%;
    background: rgba(3, 0, 25, 0.88);
    border: 1.5px solid rgba(0, 180, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 180, 255, 0.12), 0 0 40px rgba(120, 0, 255, 0.1), inset 0 0 20px rgba(0,0,0,0.7);
    overflow: hidden;
    margin-bottom: 22px;
    font-family: inherit;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    color: #cce8ff;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.feature-item + .feature-item {
    border-top: 1px dashed rgba(0, 180, 255, 0.25);
}

/* Octagon checkmark icon */
.feature-check {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-check::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00d4ff, #5b21b6);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.feature-check::after {
    content: '';
    position: absolute;
    inset: 2.5px;
    background: #04001c;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.feature-check span {
    position: relative;
    z-index: 1;
    color: #00d4ff;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 8px #00d4ff;
}

.feature-text {
    flex: 1;
    line-height: 1.4;
}

/* --- BUTTON WRAPPER — 4 corner brackets --- */
.btn-wrap {
    position: relative;
    width: 100%;
    display: block;
    margin-top: 5px;
    padding: 3px;           /* room for corners to bleed outside */
}

/* ┌ top-left */
.btn-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 20px; height: 20px;
    border-top: 3px solid #00d4ff;
    border-left: 3px solid #00d4ff;
    box-shadow: -2px -2px 10px rgba(0,212,255,0.85), -4px -4px 20px rgba(0,180,255,0.35);
    z-index: 3;
    pointer-events: none;
}

/* ┘ bottom-right */
.btn-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 20px; height: 20px;
    border-bottom: 3px solid #00d4ff;
    border-right: 3px solid #00d4ff;
    box-shadow: 2px 2px 10px rgba(0,212,255,0.85), 4px 4px 20px rgba(0,180,255,0.35);
    z-index: 3;
    pointer-events: none;
}

/* --- BUTTON --- */
.btn-hack {
    display: block;
    width: 100%;
    position: relative;
    overflow: visible;
    background: linear-gradient(135deg, rgba(6,0,35,0.98), rgba(55,0,115,0.9));
    color: #c8e8ff;
    border: 1.5px solid rgba(0,175,225,0.55);
    padding: 17px 30px;
    font-size: 1.15rem;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 3px;
    font-weight: bold;
    text-align: center;
    box-sizing: border-box;
    border-radius: 4px;
    transition: all 0.3s;
    box-shadow:
        0 0 14px rgba(0,175,255,0.4),
        0 0 35px rgba(0,100,255,0.2),
        0 0 65px rgba(80,0,200,0.12),
        inset 0 0 30px rgba(55,0,120,0.6),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ┐ top-right */
.btn-hack::before {
    content: '';
    position: absolute;
    top: -3px; right: -3px;
    width: 20px; height: 20px;
    border-top: 3px solid #00d4ff;
    border-right: 3px solid #00d4ff;
    box-shadow: 2px -2px 10px rgba(0,212,255,0.85), 4px -4px 20px rgba(0,180,255,0.35);
    z-index: 3;
    pointer-events: none;
}

/* └ bottom-left */
.btn-hack::after {
    content: '';
    position: absolute;
    bottom: -3px; left: -3px;
    width: 20px; height: 20px;
    border-bottom: 3px solid #00d4ff;
    border-left: 3px solid #00d4ff;
    box-shadow: -2px 2px 10px rgba(0,212,255,0.85), -4px 4px 20px rgba(0,180,255,0.35);
    z-index: 3;
    pointer-events: none;
}

.btn-hack:hover {
    background: linear-gradient(135deg, #0e0045, #5200aa);
    color: #fff;
    border-color: rgba(0,220,255,0.85);
    box-shadow:
        0 0 22px rgba(0,210,255,0.7),
        0 0 55px rgba(0,140,255,0.4),
        0 0 90px rgba(100,0,255,0.25),
        inset 0 0 35px rgba(75,0,175,0.6);
    text-shadow: 0 0 12px rgba(200,235,255,0.9);
    transform: scale(1.01);
}

@media (max-width: 768px) {
    .success-title-big,
    .success-title-sub {
        width: 100%;
        box-sizing: border-box;
        padding-left: 8px;
        padding-right: 8px;
        text-align: center;
    }
    .success-title-big { font-size: 1.7rem; letter-spacing: 3px; }
    .success-title-sub { font-size: 0.9rem; letter-spacing: 2px; }
    .feature-item { padding: 10px 14px; font-size: 0.82rem; gap: 10px; }
    .feature-check { width: 32px; height: 32px; }
    .feature-check span { font-size: 0.8rem; }
    .btn-hack { font-size: 1rem; padding: 14px 20px; letter-spacing: 2px; }
    .ip-panel { align-items: flex-start; flex-direction: column; gap: 6px; margin-bottom: 16px; }
    .ip-value { font-size: 0.95rem; text-align: left; }
    .btn-wrap::before, .btn-wrap::after,
    .btn-hack::before, .btn-hack::after { width: 14px; height: 14px; }
}
