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

:root {
    --primary-purple: #8b5cf6;
    --dark-purple: #6d28d9;
    --light-purple: #a78bfa;
    --bg-dark: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #262626;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --red-team: #ef4444;
    --blue-team: #3b82f6;
    --border-color: #404040;
    --glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(109, 40, 217, 0.1));
    border-radius: 20px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(139,92,246,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.glitch {
    position: relative;
    color: var(--primary-purple);
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    margin-bottom: 2rem;
}

.filter-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-purple);
    color: white;
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.filter-btn.red-team:hover,
.filter-btn.red-team.active {
    background: var(--red-team);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.filter-btn.blue-team:hover,
.filter-btn.blue-team.active {
    background: var(--blue-team);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-purple);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.article-card.red-team::before {
    background: var(--red-team);
}

.article-card.blue-team::before {
    background: var(--blue-team);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-purple);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.article-category {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.article-category.red-team {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red-team);
}

.article-category.blue-team {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-team);
}

.article-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Auth Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.terminal-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    z-index: -1;
    padding: 2rem;
    font-family: 'Courier New', monospace;
    color: var(--primary-purple);
    opacity: 0.3;
}

.terminal-line {
    margin-bottom: 0.5rem;
    animation: typewriter 2s steps(40) infinite;
}

@keyframes typewriter {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-purple), var(--dark-purple));
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

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

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.auth-switch {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.switch-btn {
    background: none;
    border: none;
    color: var(--primary-purple);
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* Profile Styles */
.profile-container {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.profile-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.profile-title {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple);
}

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

.edit-profile-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-profile-btn:hover {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
}

.content-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid transparent;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.articles-list {
    display: grid;
    gap: 1rem;
}

.user-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-article-info h3 {
    margin-bottom: 0.5rem;
}

.user-article-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.action-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    color: var(--primary-purple);
    border-color: var(--primary-purple);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.create-btn,
.save-btn {
    background: var(--primary-purple);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.create-btn:hover,
.save-btn:hover {
    background: var(--dark-purple);
    transform: translateY(-2px);
}

.settings-section {
    max-width: 500px;
}

.settings-section h3 {
    margin-bottom: 2rem;
    color: var(--primary-purple);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.setting-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .content-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .main-content,
    .profile-container {
        padding: 1rem;
    }
    
    .auth-box {
        padding: 2rem;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: center;
    }
}