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

:root {
    /* Hacker Theme Colors */
    --primary-color: #00ff41;
    --secondary-color: #00cc33;
    --bg-color: #0a0e0a;
    --bg-secondary: #0d1117;
    --text-color: #00ff41;
    --text-secondary: #7fff7f;
    --border-color: #1a3a1a;
    --hover-color: #00ff88;
    --success-color: #00ff41;
    --error-color: #ff0051;
    --warning-color: #ffaa00;
    --glow-color: rgba(0, 255, 65, 0.4);
    --matrix-green: #00ff41;
    --cyber-blue: #00d9ff;
    --terminal-green: #33ff33;
}

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

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: var(--bg-color);
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Glowing text effect */
.glow {
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
}

.red-glow {
    text-shadow: 0 0 10px var(--red-glow), 0 0 20px var(--red-glow);
}

/* Scanline effect - Matrix themed */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 255, 65, 0.03) 50%,
        transparent 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* Pulsing green glow effect */
@keyframes matrixPulse {
    0%, 100% { box-shadow: 0 0 20px var(--glow-color); }
    50% { box-shadow: 0 0 40px var(--glow-color), 0 0 60px var(--glow-color); }
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: rgba(18, 24, 25, 0.95);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-brand img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 15px var(--primary-color))
            drop-shadow(0 0 8px var(--secondary-color));
    animation: logoFloat 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.nav-brand img:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px var(--primary-color))
            drop-shadow(0 0 12px var(--secondary-color))
            brightness(1.2);
}

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

.nav-brand h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.nav-menu a::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-menu a:hover::before {
    opacity: 1;
}

.user-info {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 4px;
    border: 1px solid var(--primary-color);
}

.user-info strong {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--glow-color);
}

/* Dropdown Menu Styles */
.nav-menu li {
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown > a {
    cursor: pointer;
}

.dropdown > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 0.3em;
    transition: transform 0.3s;
}

.dropdown:hover > a::after {
    transform: rotate(-180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(18, 24, 25, 0.98);
    border: 1px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 5px 20px var(--glow-color);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background-color: rgba(0, 255, 65, 0.1);
    border-left-color: var(--primary-color);
    padding-left: 1.5rem;
    box-shadow: inset 5px 0 10px rgba(0, 255, 65, 0.2);
}

.dropdown-menu a::before {
    content: '▸ ';
    opacity: 0;
    margin-right: 0.5rem;
    transition: opacity 0.3s;
}

.dropdown-menu a:hover::before {
    opacity: 1;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, rgba(255, 0, 0, 0.05) 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "< DARKSEC_LABZ />";
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.3;
}

.hero::after {
    content: "INITIALIZED";
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 0.8rem;
    color: var(--secondary-color);
    opacity: 0.3;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-weight: 900;
    text-shadow: 0 0 30px var(--glow-color);
    animation: glitch 5s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-family: 'Share Tech Mono', monospace;
}

.subtitle::before {
    content: '# ';
    color: var(--primary-color);
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, transparent 100%);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
    transform: translateY(-5px);
}

.feature:hover::before {
    opacity: 1;
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
}

.feature p {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
}

.btn-primary:hover {
    color: var(--bg-color);
    box-shadow: 0 0 40px var(--glow-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px var(--red-glow);
}

.btn-secondary:hover {
    color: var(--bg-color);
    box-shadow: 0 0 40px var(--red-glow);
}

.btn-secondary::before {
    background: var(--secondary-color);
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Forms */
.auth-form, .thread-form, .profile-edit-form {
    max-width: 600px;
    margin: 2rem auto;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    padding: 3rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.1);
    position: relative;
}

.auth-form::before, .thread-form::before {
    content: '{ AUTHENTICATE }';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.thread-form::before {
    content: '{ NEW_THREAD }';
}

.auth-form h2, .thread-form h2, .profile-edit-form h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
    text-shadow: 0 0 20px var(--glow-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
}

.form-group label::before {
    content: '> ';
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    text-shadow: 0 0 10px var(--glow-color);
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    position: relative;
    animation: slideIn 0.3s ease-out;
    border: 1px solid;
    backdrop-filter: blur(10px);
    font-family: 'Share Tech Mono', monospace;
}

.alert::before {
    content: '[!] ';
    font-weight: bold;
}

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

.alert-success {
    background-color: rgba(0, 255, 65, 0.2);
    color: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 0 20px var(--glow-color);
}

.alert-error {
    background-color: rgba(255, 0, 85, 0.2);
    color: var(--error-color);
    border-color: var(--error-color);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.3);
}

.alert-warning {
    background-color: rgba(255, 170, 0, 0.2);
    color: var(--warning-color);
    border-color: var(--warning-color);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.3);
}

.close-alert {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-alert:hover {
    transform: rotate(90deg);
}

/* Forum */
.forum-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, transparent 100%);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.forum-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    text-shadow: 0 0 20px var(--glow-color);
}

.forum-header h2::before {
    content: '# ';
}

.breadcrumb {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb::before {
    content: '~/';
    color: var(--primary-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-shadow: 0 0 10px var(--glow-color);
}

.categories-list, .threads-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-card, .thread-item {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    position: relative;
}

.category-card::before, .thread-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover, .thread-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
    transform: translateX(10px);
}

.category-card:hover::before, .thread-item:hover::before {
    opacity: 1;
}

.category-info h3 a, .thread-info h3 a, .thread-info h4 a {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
}

.category-info h3 a::before, .thread-info h3 a::before {
    content: '>> ';
    opacity: 0;
    transition: opacity 0.3s;
}

.category-info h3 a:hover::before, .thread-info h3 a:hover::before {
    opacity: 1;
}

.category-info h3 a:hover, .thread-info h3 a:hover, .thread-info h4 a:hover {
    text-shadow: 0 0 15px var(--glow-color);
}

.category-stats, .thread-stats {
    text-align: center;
    min-width: 150px;
}

.stat {
    margin-bottom: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--glow-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 0.5rem;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.badge-pinned {
    background-color: rgba(255, 170, 0, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.badge-locked {
    background-color: rgba(255, 0, 85, 0.2);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.3);
}

.badge-admin {
    background-color: rgba(255, 0, 0, 0.2);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    box-shadow: 0 0 10px var(--red-glow);
}

.thread-item.pinned {
    border-color: var(--warning-color);
}

/* Posts */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    transition: all 0.3s;
}

.post:hover {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

.post-author {
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    width: 220px;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, transparent 100%);
}

.author-info strong a {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px var(--glow-color);
}

.author-info strong a:hover {
    text-shadow: 0 0 15px var(--glow-color);
}

.post-content {
    flex: 1;
    padding: 1.5rem;
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.post-date::before {
    content: '[';
    color: var(--primary-color);
}

.post-date::after {
    content: ']';
    color: var(--primary-color);
}

.post-text {
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-secondary);
}

.edited {
    color: var(--text-secondary);
    font-style: italic;
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.reply-form {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
}

.reply-form h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px var(--glow-color);
}

.reply-form h3::before {
    content: '> ';
}

/* Chat */
.chat-container {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.1);
    position: relative;
}

.chat-container::before {
    content: '[ LIVE CHAT ]';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.chat-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--glow-color);
}

.online-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', sans-serif;
}

.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background-color: var(--success-color);
    box-shadow: 0 0 10px var(--glow-color);
}

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

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 0 10px var(--glow-color);
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

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

.message-avatar {
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, transparent 100%);
    box-shadow: 0 0 15px var(--glow-color);
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-header strong {
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px var(--glow-color);
}

.message-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.message-time::before {
    content: '[';
    color: var(--primary-color);
}

.message-time::after {
    content: ']';
    color: var(--primary-color);
}

.message-text {
    background: rgba(0, 255, 65, 0.05);
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
    color: var(--text-secondary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.05);
}

.system-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.5rem;
    margin: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.system-message::before {
    content: '>>> ';
    color: var(--primary-color);
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
}

#chat-form {
    display: flex;
    gap: 1rem;
}

#message-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

#message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
}

/* Profile */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, rgba(255, 0, 0, 0.05) 100%);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.1);
    position: relative;
}

.profile-header::before {
    content: '[ USER_PROFILE ]';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, transparent 100%);
}

.profile-info h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
    text-shadow: 0 0 20px var(--glow-color);
}

.profile-info h2::before {
    content: '@ ';
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
    transform: translateY(-5px);
}

.stat-card h3 {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 20px var(--glow-color);
}

.stat-card p {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.profile-section {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-section h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-shadow: 0 0 15px var(--glow-color);
}

.profile-section h3::before {
    content: '# ';
}

.profile-bio {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.empty-state::before {
    content: '404 ';
    display: block;
    font-size: 4rem;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px var(--glow-color);
}

/* Footer */
footer {
    background: rgba(18, 24, 25, 0.95);
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

footer p {
    color: var(--text-secondary);
    font-family: 'Share Tech Mono', monospace;
}

footer p::before {
    content: '< ';
    color: var(--primary-color);
}

footer p::after {
    content: ' />';
    color: var(--primary-color);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Avatar Selector */
.avatar-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.5);
}

.avatar-option:hover, .avatar-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    transform: scale(1.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background: rgba(0, 255, 65, 0.05);
    transition: all 0.3s;
}

.hamburger:hover {
    box-shadow: 0 0 15px var(--glow-color);
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s;
    box-shadow: 0 0 5px var(--glow-color);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .nav-menu a {
        padding: 0.4rem 0.8rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .profile-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .navbar .container {
        position: relative;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(18, 24, 25, 0.98);
        border: 2px solid var(--primary-color);
        border-radius: 8px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 0 30px var(--glow-color);
        z-index: 1000;
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a,
    .nav-menu .user-info {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.8rem;
    }

    /* Mobile dropdown menu styles */
    .dropdown > a::after {
        display: inline-block;
    }

    .dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        border: none;
        box-shadow: none;
        background: rgba(0, 255, 65, 0.05);
        margin: 0.5rem 0;
        min-width: auto;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 0.6rem 1rem;
        text-align: center;
        border-left: none;
    }

    .dropdown-menu a:hover {
        padding-left: 1rem;
    }

    .nav-brand h1 {
        font-size: 1.3rem;
    }

    .nav-brand img {
        width: 45px;
        height: 45px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature {
        padding: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .post {
        flex-direction: column;
    }

    .post-author {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .category-card, .thread-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .category-stats, .thread-stats {
        min-width: auto;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-picture-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic-options .btn {
        width: 100%;
    }

    .flash-messages {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 70px;
    }

    .auth-form, .thread-form, .profile-edit-form {
        padding: 1.5rem;
        margin: 1rem auto;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .chat-container {
        height: 70vh;
    }

    .forum-header {
        padding: 1.5rem;
    }

    .forum-header h2 {
        font-size: 1.8rem;
    }

    .files-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .files-grid {
        grid-template-columns: 1fr;
    }

    .file-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
    }

    .modal-body {
        padding: 1rem;
    }

    .avatar-selector {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 0.5rem;
    }

    .avatar-option {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-brand h1 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .nav-brand img {
        width: 40px;
        height: 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .hero::before,
    .hero::after {
        font-size: 0.6rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .feature h3 {
        font-size: 1.2rem;
    }

    .feature p {
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .file-name {
        font-size: 1rem;
    }

    .file-description {
        font-size: 0.85rem;
    }

    .file-card {
        padding: 1rem;
    }

    .message-avatar {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    .stat-card p {
        font-size: 0.8rem;
    }

    .profile-avatar,
    .current-profile-pic img,
    .current-profile-pic .emoji-avatar {
        width: 100px;
        height: 100px;
    }

    .current-profile-pic .emoji-avatar {
        font-size: 50px;
    }

    .profile-info h2 {
        font-size: 1.5rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .chat-container {
        height: 80vh;
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 992px) {
    .container {
        padding: 0 30px;
    }

    .hero-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .files-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading Animation */
@keyframes loading {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

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

/* Profile Picture Upload Styles */
.profile-picture-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.current-profile-pic {
    flex-shrink: 0;
}

.current-profile-pic img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    transition: all 0.3s ease;
}

.current-profile-pic img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow-color);
}

.current-profile-pic .emoji-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(255, 0, 85, 0.1));
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    transition: all 0.3s ease;
}

.current-profile-pic .emoji-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow-color);
}

.profile-pic-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.profile-pic-options .btn {
    width: fit-content;
    cursor: pointer;
}

#upload-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    animation: progressAnimation 1.5s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

.progress-text {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: center;
}

/* Avatar display improvements across site */
.user-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

.user-avatar.small {
    width: 32px;
    height: 32px;
}

.user-avatar.medium {
    width: 64px;
    height: 64px;
}

.user-avatar.large {
    width: 120px;
    height: 120px;
}

/* Files Page Styles */
.files-page {
    padding: 2rem 0;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.files-header .page-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--glow-color);
}

.info-banner {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid;
}

.info-banner-upload {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.info-banner-download {
    background: rgba(255, 170, 0, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.info-banner .icon {
    font-size: 1.5rem;
}

.files-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.file-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-5px);
}

.file-icon {
    text-align: center;
    font-size: 3rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-download {
    flex: 1;
    background: var(--primary-color);
    color: var(--bg-color);
}

.btn-download:hover {
    background: var(--hover-color);
}

.btn-delete {
    background: var(--error-color);
    color: #fff;
}

.btn-delete:hover {
    background: #cc0044;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    margin-top: 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 20px auto;
    padding: 0;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 0 30px var(--glow-color);
    display: flex;
    flex-direction: column;
}

.modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding: 2rem;
}

.modal-header h2 {
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--primary-color);
}

.file-input-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-wrapper:hover,
.file-input-wrapper.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 65, 0.05);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.file-input-label .icon {
    font-size: 2rem;
}

.file-input-label .text {
    color: var(--text-secondary);
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--hover-color));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--glow-color);
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* Responsive Design for Files Page */
@media (max-width: 768px) {
    .files-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .files-grid {
        grid-template-columns: 1fr;
    }

    .file-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================
   LOADING STATES & SKELETON SCREENS
   ========================================== */

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 10px var(--glow-color);
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 10, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-overlay .loading-text {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--glow-color);
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Skeleton Screen Components */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        rgba(0, 255, 65, 0.1) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

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

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 70%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-avatar-large {
    width: 100px;
    height: 100px;
}

.skeleton-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.skeleton-thread {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.skeleton-thread-content {
    flex: 1;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: 8px;
}

/* Progress Bar Enhancements */
.progress-container {
    width: 100%;
    margin: 1rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.progress-bar-wrapper {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--hover-color));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 15px var(--glow-color);
}

.progress-bar-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: progress-shine 2s ease-in-out infinite;
}

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

/* Indeterminate Progress */
.progress-indeterminate {
    position: relative;
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-indeterminate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--primary-color), var(--hover-color));
    box-shadow: 0 0 10px var(--glow-color);
    animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ==========================================
   ENHANCED ERROR & SUCCESS MESSAGES
   ========================================== */

.message-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.toast.success {
    border-color: var(--success-color);
}

.toast.success::before {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.toast.error {
    border-color: var(--error-color);
}

.toast.error::before {
    background: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
}

.toast.warning {
    border-color: var(--warning-color);
}

.toast.warning::before {
    background: var(--warning-color);
    box-shadow: 0 0 10px var(--warning-color);
}

.toast.info {
    border-color: var(--cyber-blue);
}

.toast.info::before {
    background: var(--cyber-blue);
    box-shadow: 0 0 10px var(--cyber-blue);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success-color);
    text-shadow: 0 0 10px var(--success-color);
}

.toast.error .toast-icon {
    color: var(--error-color);
    text-shadow: 0 0 10px var(--error-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
    text-shadow: 0 0 10px var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--cyber-blue);
    text-shadow: 0 0 10px var(--cyber-blue);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--primary-color);
}

/* Progress bar in toast */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    width: 100%;
    animation: toast-timer 5s linear forwards;
}

@keyframes toast-timer {
    from { width: 100%; }
    to { width: 0%; }
}

/* Better Alert Boxes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 2px solid;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-secondary);
    animation: slideInDown 0.3s ease;
}

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

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.alert-message {
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert.success {
    border-color: var(--success-color);
}

.alert.success .alert-icon,
.alert.success .alert-title {
    color: var(--success-color);
    text-shadow: 0 0 10px var(--success-color);
}

.alert.error {
    border-color: var(--error-color);
}

.alert.error .alert-icon,
.alert.error .alert-title {
    color: var(--error-color);
    text-shadow: 0 0 10px var(--error-color);
}

.alert.warning {
    border-color: var(--warning-color);
}

.alert.warning .alert-icon,
.alert.warning .alert-title {
    color: var(--warning-color);
    text-shadow: 0 0 10px var(--warning-color);
}

.alert.info {
    border-color: var(--cyber-blue);
}

.alert.info .alert-icon,
.alert.info .alert-title {
    color: var(--cyber-blue);
    text-shadow: 0 0 10px var(--cyber-blue);
}

/* Inline Loading State */
.inline-loader {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.inline-loader .dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dot-pulse 1.4s ease-in-out infinite;
    box-shadow: 0 0 5px var(--glow-color);
}

.inline-loader .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.inline-loader .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-pulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: var(--bg-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .message-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .toast {
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

/* ==========================================
   MOBILE OPTIMIZATIONS & TOUCH INTERACTIONS
   ========================================== */

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    .btn,
    button,
    a,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }

    /* Larger form inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }

    /* Larger navigation items */
    .nav-menu li a {
        padding: 1rem 1.5rem;
    }

    /* Remove hover states on touch devices */
    .btn:hover,
    button:hover {
        transform: none;
    }

    /* Add tap highlight */
    .btn,
    button,
    a {
        -webkit-tap-highlight-color: rgba(0, 255, 65, 0.2);
    }
}

/* Mobile viewport optimizations */
@media (max-width: 768px) {
    /* Better spacing */
    .container {
        padding: 0 15px;
    }

    /* Stack layouts */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Larger text */
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Full-width tables */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Better form layouts */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Sticky bottom navigation option */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 2px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        padding: 0.75rem 0;
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.75rem;
        flex: 1;
        padding: 0.5rem;
        transition: color 0.2s;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:active {
        color: var(--primary-color);
    }

    .mobile-bottom-nav a svg,
    .mobile-bottom-nav a .icon {
        font-size: 1.5rem;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    /* Optimize for landscape mode */
    .navbar {
        padding: 0.5rem 0;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* Small mobile devices */
@media (max-width: 380px) {
    /* Further optimizations for small screens */
    .container {
        padding: 0 10px;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.6rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
    }
}

/* ==========================================
   GESTURE SUPPORT & SWIPE INTERACTIONS
   ========================================== */

/* Swipeable cards */
.swipeable {
    touch-action: pan-y;
    user-select: none;
}

/* Pull to refresh indicator */
.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    transform: translateY(-100%);
    transition: transform 0.3s;
    z-index: 9999;
}

.pull-to-refresh.active {
    transform: translateY(0);
}

.pull-to-refresh .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Improved scrolling */
.scroll-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .navbar {
        padding-top: calc(1rem + env(safe-area-inset-top));
    }

    .mobile-bottom-nav {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }
}

/* ==========================================
   PWA SPECIFIC STYLES
   ========================================== */

/* Hide elements when running as PWA */
.pwa-mode .browser-only {
    display: none !important;
}

/* PWA specific layouts */
.pwa-mode .navbar {
    padding-top: env(safe-area-inset-top, 1rem);
}

/* iOS PWA status bar */
@supports (-webkit-touch-callout: none) {
    .pwa-mode {
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top);
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s;
}

.skip-to-main:focus {
    top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00ff00;
        --border-color: #00ff00;
        --text-secondary: #ffffff;
    }

    .btn,
    button {
        border: 2px solid var(--primary-color);
    }
}

/* Dark mode detection (system preference) */
@media (prefers-color-scheme: light) {
    /* Override for users who prefer light mode */
    /* (Current theme is already dark, so this is for future expansion) */
}
