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

:root {
    --primary: #ff0000;
    --secondary: #00ffff;
    --dark: #050505;
    --panel: rgba(10, 10, 15, 0.95);
    --grid-color: rgba(255, 0, 0, 0.15);
    
    /* Rayan Theme */
    --rayan-bg: #050505;
    --rayan-panel: #0A0A0A;
    --rayan-border: #1F2326;
    --rayan-text: #39FF14;
    --rayan-accent: #00FFFF;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: var(--dark);
    color: #e0e0e0;
    overflow: hidden;
    user-select: none; /* Disable text selection to prevent blue highlight annoyance */
    -webkit-user-select: none;
}

/* Allow selection in editor and logs */
textarea, input, .rayan-code-editor, .rayan-log-panel, #rayan-hex-view, #leak-code-preview {
    user-select: text;
    -webkit-user-select: text;
}

/* --- Background Grid Animation --- */
.cyber-grid {
    position: fixed;
    top: -50vh;
    left: -50vw;
    width: 200vw;
    height: 200vh;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: grid-move 20s linear infinite;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px); }
}

.cyber-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.9) 100%);
    pointer-events: none;
    z-index: 1;
}

/* --- CRT Scanline Effect --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0,0,0,0.3) 3px,
        rgba(0,0,0,0.3) 4px
    );
    pointer-events: none;
    z-index: 50;
    opacity: 0.15;
}

/* --- LANDING PAGE --- */
.landing-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.landing-card:hover {
    transform: scale(1.05) translateY(-10px);
    z-index: 10;
}

.landing-card.tx-card:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
    border-color: #ff0000;
}

.landing-card.rayan-card:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    border-color: #00ffff;
}

.landing-card.leak-card:hover {
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.4);
    border-color: #eab308;
}

/* --- TX-HUNTER STYLES (Existing) --- */
.cyber-card {
    background: rgba(10, 10, 15, 0.98);
    border: 1px solid rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.1); 
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

.cyber-input {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    color: var(--primary);
    transition: all 0.3s;
    font-family: 'Share Tech Mono', monospace;
}

.cyber-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
    outline: none;
}

.cyber-btn {
    position: relative;
    background: rgba(20, 0, 0, 0.8);
    border: 1px solid var(--primary);
    color: var(--primary);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    overflow: hidden;
    transition: all 0.3s;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.cyber-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

/* --- RAYAN DASHBOARD RE-DESIGN --- */
.rayan-wrapper {
    background-color: #0b0c10;
    border: 1px solid #1f2833;
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.rayan-header {
    background: #0b0c10;
    border-bottom: 1px solid #1f2833;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 48px;
}

.rayan-title {
    color: #66fcf1;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rayan-sidebar {
    width: 260px;
    background: #111318;
    border-right: 1px solid #1f2833;
    display: flex;
    flex-direction: column;
}

.rayan-category {
    padding: 12px 16px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #45a29e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rayan-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #c5c6c7;
    font-size: 13px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    background: transparent;
    width: 100%;
    text-align: left;
}

.rayan-nav-btn:hover {
    background: rgba(102, 252, 241, 0.05);
    color: #fff;
}

.rayan-nav-btn.active {
    background: rgba(102, 252, 241, 0.1);
    color: #66fcf1;
    border-left: 3px solid #66fcf1;
}

.rayan-main {
    background: #0b0c10;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.rayan-panel {
    background: #111318;
    border: 1px solid #1f2833;
    border-radius: 6px;
    padding: 16px;
}

.rayan-input-group {
    display: flex;
    gap: 10px;
}

.rayan-file-input {
    flex: 1;
    background: #0b0c10;
    border: 1px solid #1f2833;
    color: #c5c6c7;
    padding: 10px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.rayan-action-btn {
    background: #45a29e;
    color: #0b0c10;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.rayan-action-btn:hover {
    background: #66fcf1;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
}

.rayan-code-editor {
    flex: 1;
    background: #050608;
    border: 1px solid #1f2833;
    border-radius: 6px;
    padding: 12px;
    color: #c5c6c7;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

.rayan-code-editor:focus {
    border-color: #45a29e;
}

.rayan-log-panel {
    height: 120px;
    background: #000;
    border-top: 1px solid #1f2833;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: #66fcf1;
    overflow-y: auto;
}

/* Scrollbar for Rayan */
.rayan-scroll::-webkit-scrollbar { width: 6px; }
.rayan-scroll::-webkit-scrollbar-track { background: #0b0c10; }
.rayan-scroll::-webkit-scrollbar-thumb { background: #1f2833; border-radius: 3px; }
.rayan-scroll::-webkit-scrollbar-thumb:hover { background: #45a29e; }


/* --- LEAK HUNTER STYLES --- */
.leak-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #9ca3af;
    font-size: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    background: transparent;
    width: 100%;
    text-align: left;
}

.leak-nav-btn:hover {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.leak-nav-btn.active {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border-left: 3px solid #eab308;
    box-shadow: 5px 0 15px -5px rgba(234, 179, 8, 0.3);
}

.leak-stat-card {
    background: #0f0f0f;
    border: 1px solid #27272a;
    padding: 20px;
    border-radius: 4px;
    transition: transform 0.2s;
}

.leak-stat-card:hover {
    transform: translateY(-2px);
    background: #141414;
}

/* --- SOME TOOLS STYLES --- */
.tools-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #a8a29e;
    font-size: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    background: transparent;
    width: 100%;
    text-align: left;
}

.tools-nav-btn:hover {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.tools-nav-btn.active {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border-left: 3px solid #a855f7;
    box-shadow: 5px 0 15px -5px rgba(168, 85, 247, 0.3);
}

.landing-card.tools-card:hover {
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    border-color: #a855f7;
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #000; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- UTILS --- */
.glitch {
    position: relative;
    color: var(--primary);
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--dark);
}
.glitch::before {
    left: 2px; text-shadow: -1px 0 #00ffff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px; text-shadow: -1px 0 #ff00ff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

.hidden { display: none !important; }
