/* Noir Case Files — Custom Styles */

/* ===== Base ===== */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0f;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ===== Navigation ===== */
.nav-link {
    @apply px-3 py-2 text-sm font-medium text-slate-400 hover:text-white rounded-md transition-colors;
}
.nav-active {
    @apply text-cyan-400;
}
.mobile-nav-link {
    @apply block px-3 py-2.5 text-sm font-medium text-slate-400 hover:text-white hover:bg-white/5 rounded-md transition-colors;
}

/* ===== Cards ===== */
.noir-card {
    @apply bg-[#12121a] border border-white/5 rounded-xl overflow-hidden transition-all duration-300;
}
.noir-card:hover {
    border-color: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.05);
}

/* ===== Hero Scanline Effect ===== */
.scanlines {
    position: relative;
}
.scanlines::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* ===== Terminal Cursor ===== */
.cursor-blink {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: #00d4ff;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Typing Effect ===== */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #00d4ff;
    animation: typing 2s steps(20) forwards, blinkCaret 0.75s step-end infinite;
    width: 0;
}

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

@keyframes blinkCaret {
    0%, 100% { border-color: #00d4ff; }
    50% { border-color: transparent; }
}

/* ===== Glow Effects ===== */
.glow-cyan {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.glow-box-cyan {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}
.glow-box-cyan-hover:hover {
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.15);
}

/* ===== Buttons ===== */
.btn-primary {
    @apply inline-flex items-center gap-2 px-6 py-3 bg-cyan-500 text-black font-mono font-bold rounded-lg transition-all duration-200;
}
.btn-primary:hover {
    @apply bg-cyan-400;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}
.btn-secondary {
    @apply inline-flex items-center gap-2 px-6 py-3 border border-white/20 text-white font-mono font-medium rounded-lg hover:border-cyan-500/50 hover:text-cyan-400 transition-all duration-200;
}

/* ===== Video Embed ===== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Article Content ===== */
.article-content {
    @apply text-slate-300 leading-relaxed;
}
.article-content h2 {
    @apply text-2xl font-mono font-bold text-white mt-10 mb-4;
}
.article-content h3 {
    @apply text-xl font-mono font-bold text-white mt-8 mb-3;
}
.article-content p {
    @apply mb-5;
}
.article-content a {
    @apply text-cyan-400 hover:text-cyan-300 underline underline-offset-2 transition-colors;
}
.article-content ul, .article-content ol {
    @apply mb-5 pl-6;
}
.article-content ul {
    @apply list-disc;
}
.article-content ol {
    @apply list-decimal;
}
.article-content li {
    @apply mb-2;
}
.article-content code {
    @apply font-mono text-sm bg-black/50 text-cyan-400 px-1.5 py-0.5 rounded border border-white/10;
}
.article-content pre {
    @apply bg-black/50 border border-white/10 rounded-lg p-4 mb-5 overflow-x-auto;
}
.article-content pre code {
    @apply bg-transparent border-0 p-0 text-slate-300;
}
.article-content blockquote {
    @apply border-l-4 border-cyan-500/50 pl-4 italic text-slate-400 mb-5;
}
.article-content img {
    @apply rounded-lg border border-white/10 my-6;
}

/* ===== Noise texture overlay ===== */
.noise-overlay {
    position: relative;
}
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ===== Category Cards ===== */
.category-card {
    @apply bg-[#12121a] border border-white/5 rounded-xl p-6 transition-all duration-300;
}
.category-card:hover {
    @apply border-cyan-500/20;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.08);
}

/* ===== Form Inputs ===== */
.form-input {
    @apply w-full px-4 py-3 bg-[#0a0a0f] border border-white/10 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-cyan-500/50 transition-colors;
}
.form-label {
    @apply block text-sm font-medium text-slate-300 mb-1.5;
}
.form-select {
    @apply w-full px-4 py-3 bg-[#0a0a0f] border border-white/10 rounded-lg text-white focus:outline-none focus:border-cyan-500/50 transition-colors appearance-none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* ===== Pagination ===== */
.pagination-link {
    @apply px-3 py-2 text-sm border border-white/10 rounded-lg text-slate-400 hover:text-white hover:border-cyan-500/30 transition-colors;
}
.pagination-active {
    @apply bg-cyan-500/20 text-cyan-400 border-cyan-500/50;
}

/* ===== Admin Styles ===== */
.admin-sidebar a {
    @apply block px-4 py-2.5 text-sm text-slate-400 hover:text-white hover:bg-white/5 rounded-lg transition-colors;
}
.admin-sidebar a.active {
    @apply text-cyan-400 bg-cyan-500/10;
}

/* ===== Responsive YouTube ===== */
.yt-lazy {
    position: relative;
    padding-bottom: 56.25%;
    background: #12121a;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.yt-lazy img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.yt-lazy .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.yt-lazy:hover .play-btn {
    background: #ff0000;
}
.yt-lazy .play-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
    margin-left: 3px;
}
