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

:root {
    --primary: #8b5cf6;
    --bg: #0a0a0f;
    --bg-light: #12121a;
    --text: #ffffff;
    --text-dim: #a0a0b0;
    --border: rgba(139, 92, 246, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(45deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: brightness(1);
        text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    }
    50% {
        filter: brightness(1.2);
        text-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
    }
}

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

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 3s ease-in-out infinite;
}

.social-btn:hover {
    background: var(--primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.discord {
    animation-delay: 0s;
}

.telegram {
    animation-delay: 0.3s;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(139, 92, 246, 0);
    }
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.page.active {
    display: block;
}

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

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 150px);
    text-align: center;
}

.hero-title {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--primary), #ec4899, var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite, scaleIn 1s ease-out;
}

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

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-top: 1rem;
    letter-spacing: 0.3em;
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 2rem;
    animation: slideInLeft 0.6s ease-out;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

/* Button */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

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

.btn-primary:active {
    transform: translateY(0);
}

.full-width {
    width: 100%;
    justify-content: center;
}

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

/* Forum Posts */
.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.forum-post {
    background: rgba(18, 18, 26, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    animation: slideInUp 0.5s ease-out;
}

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

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

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

.post-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    animation: rotate 10s linear infinite;
}

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

.author-name {
    font-weight: 600;
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.post-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.post-content {
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.post-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.post-media img,
.post-media video,
.post-media audio {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-media img:hover,
.post-media video:hover {
    transform: scale(1.05);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.post-media audio {
    width: 100%;
}

.post-actions {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.action-btn svg {
    transition: transform 0.3s ease;
}

.action-btn:hover svg {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: scaleInItem 0.5s ease-out;
}

@keyframes scaleInItem {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
}

.gallery-item-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.gallery-item-description {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Feed */
.feed-container {
    max-width: 600px;
    margin: 0 auto;
    height: calc(100vh - 200px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.feed-container::-webkit-scrollbar {
    display: none;
}

.video-feed {
    display: flex;
    flex-direction: column;
}

.feed-item {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--bg-light);
    animation: fadeIn 0.5s ease-out;
}

.feed-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.feed-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feed-description {
    color: var(--text-dim);
}

.feed-actions {
    position: absolute;
    right: 1rem;
    bottom: 8rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feed-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.feed-action-btn:hover {
    background: var(--primary);
    transform: scale(1.2);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.empty-state svg {
    color: var(--text-dim);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.empty-state p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state span {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

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

.modal-header h3 {
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.input-field,
.textarea-field {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.textarea-field {
    min-height: 120px;
    resize: vertical;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.file-upload-label:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    transform: scale(1.02);
}

.file-upload-label svg {
    margin-bottom: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.file-preview img,
.file-preview video {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    animation: scaleInItem 0.3s ease-out;
}

/* Image Viewer */
.image-viewer {
    max-width: 90vw;
    max-height: 90vh;
}

#imageViewerContent img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    animation: scaleIn 0.3s ease-out;
}

/* Custom Player */
.custom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 1500;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.custom-player:not(.hidden) {
    transform: translateY(0);
}

.player-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.player-title {
    font-weight: 600;
}

.player-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-close:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.player-video {
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.player-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.1);
}

.player-progress {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-filled {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
    animation: pulse 1.5s ease-in-out infinite;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

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

    .hero-title {
        font-size: 4rem;
    }

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

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
