/* DreamWorld Bug Tracker - Main Stylesheet */
/* Color Palette: Purple (#8B5CF6, #7C3AED, #6D28D9) + White */

:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --primary-darker: #6D28D9;
    --primary-light: #A78BFA;
    --secondary: #ffffff;
    --bg-dark: #0f0a1a;
    --bg-card: #1a1025;
    --bg-card-hover: #251535;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --border-color: #2d2d3d;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(109, 40, 217, 0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page transitions */
#app {
    animation: fadeInUp 0.4s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header / Navigation */
header {
    background: rgba(15, 10, 26, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(139, 92, 246, 0.15);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: transform var(--transition-normal);
}

.logo:hover img {
    transform: rotate(10deg);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    padding: 8px 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

nav a:hover, nav a.active {
    color: var(--primary-light);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.lang-btn:hover, .lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Auth Button */
.auth-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.auth-btn.logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.auth-btn.logout:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Banner */
.banner {
    background: linear-gradient(135deg, var(--primary-darker) 0%, var(--bg-dark) 100%);
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
}

.banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.banner-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

.banner h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

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

/* Main Content */
main {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

/* Page Title */
.page-title {
    margin-bottom: 30px;
    animation: slideInLeft 0.4s ease;
}

.page-title h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15);
}

/* Bug List */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    animation: fadeIn 0.4s ease;
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 10px;
    min-width: 160px;
    cursor: pointer;
    transition: all var(--transition-fast);
    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='%238B5CF6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.bug-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bug-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    animation: fadeInUp 0.4s ease backwards;
}

.bug-card:nth-child(1) { animation-delay: 0.05s; }
.bug-card:nth-child(2) { animation-delay: 0.1s; }
.bug-card:nth-child(3) { animation-delay: 0.15s; }
.bug-card:nth-child(4) { animation-delay: 0.2s; }
.bug-card:nth-child(5) { animation-delay: 0.25s; }
.bug-card:nth-child(n+6) { animation-delay: 0.3s; }

.bug-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all var(--transition-fast);
}

.status-open { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.status-in_progress { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.status-fixed { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.status-wont_fix { background: rgba(107, 114, 128, 0.2); color: #9CA3AF; }
.status-duplicate { background: rgba(156, 163, 175, 0.2); color: #D1D5DB; }

.priority-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.priority-low { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.priority-medium { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.priority-high { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.priority-critical { background: rgba(239, 68, 68, 0.15); color: #F87171; }

.bug-content {
    flex: 1;
}

.bug-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.bug-card:hover .bug-title {
    color: var(--primary-light);
}

.bug-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bug-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bug-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.bug-actions {
    display: flex;
    align-items: center;
}

.btn-view {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-view i {
    transition: transform var(--transition-fast);
}

.btn-view:hover i {
    transform: translateX(3px);
}

/* Forms */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    animation: scaleIn 0.4s ease;
}

.form-group {
    margin-bottom: 24px;
    animation: fadeInUp 0.3s ease backwards;
}

.form-group:nth-child(1) { animation-delay: 0.05s; }
.form-group:nth-child(2) { animation-delay: 0.1s; }
.form-group:nth-child(3) { animation-delay: 0.15s; }
.form-group:nth-child(4) { animation-delay: 0.2s; }
.form-group:nth-child(5) { animation-delay: 0.25s; }
.form-group:nth-child(n+6) { animation-delay: 0.3s; }

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-label .required {
    color: var(--error);
}

.form-help {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--primary-dark);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.file-upload::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.file-upload:hover::before {
    opacity: 1;
}

.file-upload:hover {
    border-color: var(--primary);
    transform: scale(1.01);
}

.file-upload-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.file-upload:hover .file-upload-icon {
    transform: scale(1.1);
}

.file-upload input {
    display: none;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.file-item {
    background: var(--bg-card);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: scaleIn 0.3s ease;
    border: 1px solid var(--border-color);
}

.file-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.file-item .remove-file {
    background: var(--error);
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
}

.file-item .remove-file:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Video Links */
.video-links-container {
    margin-top: 15px;
}

.video-link-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    animation: fadeInUp 0.3s ease;
}

.video-link-input input {
    flex: 1;
}

.btn-add-video, .btn-remove-video {
    background: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
}

.btn-add-video:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-remove-video {
    background: var(--error);
}

.btn-remove-video:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 16px 45px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit:disabled:hover {
    box-shadow: none;
}

.btn-submit:disabled::before {
    display: none;
}

/* Bug Detail Page */
.bug-detail {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
}

.bug-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.bug-detail-title {
    font-size: 1.9rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.bug-detail-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bug-detail-section {
    margin-bottom: 30px;
    animation: fadeInUp 0.4s ease backwards;
}

.bug-detail-section:nth-child(1) { animation-delay: 0.1s; }
.bug-detail-section:nth-child(2) { animation-delay: 0.15s; }
.bug-detail-section:nth-child(3) { animation-delay: 0.2s; }
.bug-detail-section:nth-child(4) { animation-delay: 0.25s; }
.bug-detail-section:nth-child(5) { animation-delay: 0.3s; }

.bug-detail-section h3 {
    font-size: 1.1rem;
    color: var(--primary-light);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bug-detail-section p,
.bug-detail-section pre {
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.7;
}

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.attachment-item {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    text-decoration: none;
}

.attachment-item:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.attachment-item img,
.attachment-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.attachment-item .name {
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--bg-dark);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.video-link-item:hover {
    background: var(--bg-card-hover);
}

.video-link-item a {
    color: var(--primary-light);
    text-decoration: none;
    word-break: break-all;
}

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

.admin-response-box {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 25px;
    animation: scaleIn 0.4s ease;
}

.admin-response-box h4 {
    color: var(--primary-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

/* Admin Panel */
.admin-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
}

@media (max-width: 800px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
    animation: slideInLeft 0.4s ease;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 8px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.admin-menu a:hover,
.admin-menu a.active {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.admin-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    animation: slideInRight 0.4s ease;
}

/* Login Form */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    animation: scaleIn 0.5s ease;
}

.login-form {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 45px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 35px;
    color: var(--primary-light);
    font-size: 1.5rem;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    animation: bounceIn 0.5s ease;
}

/* Admin Bug List */
.admin-bug-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: var(--bg-dark);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.admin-bug-item:hover {
    border-color: var(--border-color);
    transform: translateX(5px);
}

.admin-bug-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn-edit {
    background: var(--primary);
    color: white;
}

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

.btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 35px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(20px);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
}

.legal-content h1 {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.legal-content h2 {
    color: var(--primary-light);
    margin: 35px 0 18px;
    font-size: 1.4rem;
}

.legal-content h3 {
    color: var(--text-primary);
    margin: 25px 0 12px;
    font-size: 1.1rem;
}

.legal-content p, .legal-content li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.legal-content ul {
    padding-left: 25px;
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 50px 20px 25px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

@media (max-width: 700px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-section h4 {
    color: var(--primary-light);
    margin-bottom: 20px;
    font-size: 1.15rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
}

@media (max-width: 700px) {
    .footer-section a {
        justify-content: center;
    }
}

.footer-section a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--primary-light);
}

.made-with-love {
    display: flex;
    align-items: center;
    gap: 6px;
}

.made-with-love .heart {
    color: var(--error);
    animation: heartbeat 1.5s ease-in-out infinite;
    font-size: 1.1rem;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Alerts */
.alert {
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: bounceIn 0.5s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert i {
    font-size: 1.3rem;
}

/* Global success toast */
.toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--success);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--success);
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.5s ease, toastOut 0.5s ease 3.5s forwards;
}

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

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

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    animation: fadeIn 0.5s ease;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.5;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: transform var(--transition-fast);
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 25px;
        gap: 15px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-right {
        flex-direction: column;
        width: 100%;
    }
}

/* Back button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 25px;
    transition: all var(--transition-fast);
    padding: 10px 0;
}

.btn-back:hover {
    color: var(--primary-light);
    transform: translateX(-5px);
}

.btn-back i {
    transition: transform var(--transition-fast);
}

.btn-back:hover i {
    transform: translateX(-3px);
}

/* Mod badge */
.mod-badge {
    background: var(--primary);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.mod-badge:hover {
    transform: scale(1.05);
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

@media (max-width: 700px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all var(--transition-normal);
    animation: scaleIn 0.4s ease backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 5px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth transitions for page changes */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.page-transition-exit {
    opacity: 1;
}

.page-transition-exit-active {
    opacity: 0;
    transition: opacity 0.2s ease;
}
