/* ============================================================
   RedPoint RD v2.0 — Cyber Dark Premium Theme
   ============================================================ */

/* === BASE === */
* {
    scrollbar-width: thin;
    scrollbar-color: #E60000 #1A1A1A;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1A1A1A; }
::-webkit-scrollbar-thumb { background: #E60000; border-radius: 3px; }

::selection { background: #E60000; color: #FFFFFF; }

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === GLASSMORPHISM === */
.glass {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(42, 42, 42, 0.5);
}

.glass-light {
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glass-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(230, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(230, 0, 0, 0.3);
    box-shadow: 0 8px 32px rgba(230, 0, 0, 0.1);
}

/* === TYPOGRAPHY === */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.glitch::before {
    color: #E60000;
    z-index: -1;
    animation: glitch-shadow 3s infinite;
}

.glitch::after {
    color: #0D0D0D;
    z-index: -2;
    animation: glitch-shadow 3s infinite reverse;
}

@keyframes glitch-shadow {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-2px, 0px); }
    80% { transform: translate(2px, 1px); }
}

.terminal-line::before { content: "$ "; color: #E60000; }

.terminal-prompt { display: inline-flex; align-items: center; }
.terminal-prompt::before { content: "> "; color: #E60000; }

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

.cursor-blink::after {
    content: "_";
    color: #E60000;
    animation: blink 1s step-end infinite;
}

/* === CARDS === */
.cyber-card {
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cyber-card:hover {
    border-color: #E60000;
    box-shadow: 0 0 20px rgba(230, 0, 0, 0.1);
}

.cyber-card-glow:hover {
    box-shadow: 0 0 30px rgba(230, 0, 0, 0.15);
}

/* === TERMINAL WIDGET === */
.terminal-widget {
    background: #0D0D0D;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    overflow: hidden;
}

.terminal-widget-header {
    background: #1A1A1A;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #2A2A2A;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: #E60000; }
.terminal-dot.yellow { background: #EAB308; }
.terminal-dot.green { background: #22C55E; }

/* === TABLES === */
.cyber-table {
    border-collapse: collapse;
    width: 100%;
}

.cyber-table th {
    background: #0D0D0D;
    color: #888888;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2A2A2A;
}

.cyber-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #2A2A2A;
    font-size: 0.85rem;
}

.cyber-table tr:hover { background: rgba(230, 0, 0, 0.03); }

@media (max-width: 768px) {
    .cyber-table thead { display: none; }
    .cyber-table tr {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #2A2A2A;
    }
    .cyber-table td {
        display: block;
        padding: 4px 0;
        border: none;
    }
    .cyber-table td::before {
        content: attr(data-label);
        display: inline-block;
        font-family: 'Fira Code', monospace;
        font-size: 0.7rem;
        color: #888888;
        text-transform: uppercase;
        width: 100px;
        margin-right: 8px;
    }
}

/* === BARS === */
.xp-bar-bg {
    background: #0D0D0D;
    border: 1px solid #2A2A2A;
    border-radius: 4px;
    overflow: hidden;
    height: 10px;
}

.xp-bar-fill {
    background: linear-gradient(90deg, #E60000, #FF4444);
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-bar-bg {
    background: #0D0D0D;
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
    border: 1px solid #2A2A2A;
}

.skill-bar-fill {
    background: linear-gradient(90deg, #E60000, #FF6B6B);
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.badge-pending { background: rgba(234, 179, 8, 0.15); color: #EAB308; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-approved, .badge-auto_verified { background: rgba(34, 197, 94, 0.15); color: #22C55E; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-rejected { background: rgba(239, 68, 68, 0.15); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-pending_review { background: rgba(59, 130, 246, 0.15); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.3); }

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(230, 0, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(230, 0, 0, 0.6); }
}

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

@keyframes spin { to { transform: rotate(360deg); } }

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

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-up { animation: fadeInUp 0.5s ease forwards; }
.animate-fade-down { animation: fadeInDown 0.5s ease forwards; }
.animate-fade-left { animation: fadeInLeft 0.5s ease forwards; }
.animate-fade-right { animation: fadeInRight 0.5s ease forwards; }
.animate-scale { animation: scaleIn 0.3s ease forwards; }
.animate-slide-up { animation: slideUp 0.6s ease forwards; }
.animate-pulse-glow { animation: pulseGlow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* === SPINNER === */
.cyber-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #2A2A2A;
    border-top-color: #E60000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* === FORM FOCUS === */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #E60000;
    box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.2);
}

/* === BUTTON === */
button:active { transform: scale(0.98); }

.btn-primary {
    background: #E60000;
    color: white;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn-primary:hover { background: #FF1A1A; box-shadow: 0 0 20px rgba(230, 0, 0, 0.3); }

.btn-secondary {
    border: 1px solid #2A2A2A;
    color: #EAEAEA;
    font-family: 'Fira Code', monospace;
    transition: all 0.3s ease;
}
.btn-secondary:hover { border-color: #E60000; }

/* === RANK BADGES === */
.rank-Visitor { color: #888888; }
.rank-Apprentice { color: #EAB308; }
.rank-Operator { color: #22C55E; }
.rank-Security_Anayst, .rank-Security_Analyst { color: #3B82F6; }
.rank-Security_Engineer { color: #8B5CF6; }
.rank-Red_Team_Operator, .rank-Red_Team_Operator { color: #E60000; }
.rank-Senior_Operator { color: #F97316; }
.rank-Elite_Operator { color: #EC4899; }
.rank-Legend { color: #F59E0B; text-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    animation: fadeInRight 0.3s ease;
    max-width: 400px;
}

.toast-success { background: rgba(34, 197, 94, 0.9); color: white; border: 1px solid #22C55E; }
.toast-error { background: rgba(239, 68, 68, 0.9); color: white; border: 1px solid #EF4444; }
.toast-info { background: rgba(59, 130, 246, 0.9); color: white; border: 1px solid #3B82F6; }

/* === MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.2s ease;
}

.modal-content {
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease;
}

/* === TAB NAVIGATION === */
.tab-btn {
    padding: 8px 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #888888;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-btn:hover { color: #EAEAEA; }
.tab-btn.active { color: #E60000; border-bottom-color: #E60000; }

/* === HERO GRADIENT === */
.hero-gradient {
    background: radial-gradient(ellipse at top right, rgba(230, 0, 0, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at bottom left, rgba(230, 0, 0, 0.05) 0%, transparent 60%);
}

/* === GRID PATTERN === */
.grid-pattern {
    background-image:
        linear-gradient(rgba(42, 42, 42, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 42, 42, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .glass-card { border-radius: 8px; }
    .cyber-table td { font-size: 0.8rem; }
    .terminal-widget { font-size: 0.8rem; }
}

/* === PRINT === */
@media print {
    .glass, .glass-card, .glass-light { background: #1A1A1A !important; backdrop-filter: none !important; }
}
