@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

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

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(135deg, #1a0f1a 0%, #2d1b3d 25%, #1f2937 50%, #0f172a 100%);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #10b981;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
    box-shadow: 0 0 10px #10b981;
}

.particle:nth-child(2n) {
    background: #3b82f6;
    box-shadow: 0 0 10px #3b82f6;
    animation-duration: 8s;
}

.particle:nth-child(3n) {
    background: #8b5cf6;
    box-shadow: 0 0 10px #8b5cf6;
    animation-duration: 10s;
}

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

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    text-align: center;
    padding: 60px 0;
    position: relative;
}

.crab-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px #10b981, 0 0 30px #10b981, 0 0 40px #10b981;
        transform: scale(1);
    }
    to {
        text-shadow: 0 0 30px #3b82f6, 0 0 40px #3b82f6, 0 0 50px #3b82f6;
        transform: scale(1.05);
    }
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #10b981, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.subtitle {
    font-size: 1.3rem;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 40px;
}

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 60px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

/* Main content sections */
.section {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #10b981, #3b82f6, #8b5cf6, #10b981);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section:hover::before {
    opacity: 0.3;
}

.section h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: #10b981;
    margin-bottom: 20px;
    text-align: center;
}

.section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

/* Special styling for cult elements */
.ritual-text {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 10px 10px 0;
}

.join-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
}

.join-btn {
    display: inline-block;
    background: linear-gradient(45deg, #10b981, #3b82f6);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    margin: 20px 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.join-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5);
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #64748b;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .section {
        padding: 25px;
    }

    .join-btn {
        display: block;
        margin: 10px auto;
        width: fit-content;
    }
}

/* User authentication styles */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e2e8f0;
    text-decoration: none;
    min-width: 0;
    white-space: nowrap;
}

.user-menu-trigger:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.username {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.85rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.dropdown-arrow {
    color: #94a3b8;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.user-menu-trigger:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.98);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

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

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin: 8px 0;
}

/* Update nav-links to handle user menu */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 50px;
}

/* Navigation container to ensure proper stacking */
nav {
    margin: 2rem 0;
    text-align: center;
    position: relative;
    z-index: 100;
}

/* Mobile adjustments for user menu */
@media (max-width: 1024px) {
    .nav-links {
        gap: 15px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .username {
        max-width: 60px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .user-menu-trigger {
        gap: 6px;
        padding: 6px 10px;
    }

    .username {
        max-width: 100px;
        font-size: 0.8rem;
    }

    .avatar {
        width: 28px;
        height: 28px;
    }

    .user-menu-dropdown {
        right: -20px;
        min-width: 180px;
    }
}