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

.chat-memory-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.memory-panel.active
{
    z-index: 99999 !important;
}

.buffer-empty
{
    z-index: 99999 !important;
}

.test-description {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Circular Buffer Visualization */
.circular-buffer {
    background: rgba(16, 185, 129, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.buffer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat {
    text-align: center;
}

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

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.buffer-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-secondary);
}

/* Memory Panel Toggle Button */
.memory-panel-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.memory-sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.memory-sync-status.synced {
    color: var(--success-color);
}

/* Memory Panel */
.memory-panel {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    background: var(--bg-primary);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.memory-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.memory-panel-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.memory-panel-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
}

.buffer-empty {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: var(--text-secondary);
}

.buffer-item {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    background: var(--bg-secondary);
}

.buffer-item-role {
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 5px;
}

.buffer-item-text {
    font-size: 0.9rem;
}

.buffer-item-actions {
    text-align: right;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.memory-panel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.memory-panel-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
}

.buffer-empty {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: var(--text-secondary);
}

.buffer-item {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    background: var(--bg-secondary);
}

.buffer-item-role {
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 5px;
}

.buffer-item-text {
    font-size: 0.9rem;
}

.buffer-item.user {
    background: var(--primary-color);
}

.buffer-item.assistant {
    background: var(--secondary-color);
}


.buffer-item-role {
    font-size: 0.7rem;
    margin-right: 5px;
    padding: 2px 5px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.buffer-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buffer-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.buffer-item-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.chat-memory-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
    transition: all 0.3s ease;
}

.chat-memory-indicator.active {
    background-color: rgba(16, 185, 129, 0.2);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.4);
}

.chat-memory-indicator.inactive {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.2);
}

/* Make sure memory indicator is visible */
.chat-memory-indicator {
    display: block !important;
    visibility: visible !important;
}

.chat-controls {
    position: relative;
    z-index: 10; /* Ensure controls are above other elements */
}

.chat-memory-indicator.active {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.chat-memory-indicator.inactive {
  background-color: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 50%, #fff5f8 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(147, 51, 234, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Public Users Section Styles */
.users-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.users-stats .stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: var(--transition);
}

.users-stats .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.users-stats .stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.users-stats .stat-card h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.users-stats .stat-card p {
    color: var(--text-secondary);
    font-weight: 600;
}

.users-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.user-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.05), transparent);
    transition: left 0.5s ease;
}

.user-card:hover::before {
    left: 100%;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

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

.user-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

.user-card-info {
    flex: 1;
}

.user-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-card-role {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-card-about {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.user-card-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-card-stat i {
    color: var(--primary-color);
}

.user-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.user-status-indicator.inactive {
    background: #ef4444;
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .users-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-controls {
        justify-content: space-between;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .users-stats {
        grid-template-columns: 1fr;
    }
}

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

}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.logo i {
    font-size: 2rem;
    color: #9333ea;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #9333ea;
    background: rgba(147, 51, 234, 0.1);
    transform: translateY(-2px);
}

.nav-link i {
    font-size: 1.1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    margin-top: 120px !important;
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    animation: slideInLeft 1s ease-out;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vr-headset {
    font-size: 15rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 3s ease-in-out infinite;
}

/* Add subtle loading states */
.btn:active {
    transform: scale(0.98);
}

/* Better form validation feedback */
.form-group input:invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Reduce repaints with will-change */
.vr-headset {
    will-change: transform;
    animation: float 3s ease-in-out infinite;
}

.feature-card:hover {
    will-change: transform, box-shadow;
}

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

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

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(45deg, #9333ea, #ec4899);
    color: white;
    padding: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}

/* Gallery Styles */
.gallery-upload-section {
    margin-bottom: 2rem;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    background: var(--bg-auth);
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(147, 51, 234, 0.05);
}

.upload-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 15px;
}

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

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.gallery-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

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

.gallery-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-medium);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.gallery-item-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.gallery-item-likes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.gallery-item-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
}

.image-modal.active {
    display: flex;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.image-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.image-modal img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 10px;
}

.image-info {
    margin-top: 1.5rem;
    text-align: center;
}

.image-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.image-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .image-modal-content {
        padding: 1rem;
    }
    
    .image-modal img {
        max-height: 40vh;
    }
}

.btn-secondary {
    background: white;
    color: #9333ea;
    border: 2px solid #9333ea;
}

.btn-secondary:hover {
    background: #9333ea;
    color: white;
    transform: translateY(-2px);
}

/* Features Section */
.features-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.2);
}

.feature-card i {
    font-size: 3rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Auth Section */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
}

.auth-container {
    width: 100%;
}

#loginForm {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(147, 51, 234, 0.15);
    animation: fadeInUp 0.6s ease-out;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: none;
}

#registerForm
{
    max-width: 500px;
    margin-right: auto;
    margin-left: auto;
    display: block;
}

.auth-form.hidden {
    display: none !important;
}

.auth-form.visible {
    display: block !important;
}

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

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9333ea;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.auth-form p {
    text-align: center;
    margin-top: 1.5rem;
    color: #6b7280;
}

.auth-form a {
    color: #9333ea;
    text-decoration: none;
    font-weight: 600;
}

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

/* Join Section */
.join-content {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.join-item {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    border-radius: 15px;
}

.join-item i {
    font-size: 3rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Play Section */
.play-content {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.play-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1);
}

.play-item i {
    font-size: 3rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #9333ea, #ec4899);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.footer-social a:hover {
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

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

    .vr-headset {
        font-size: 8rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

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

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

/* Logo Styles */
.logo-img {
    height: 100px;
    width: auto;
    margin-right: 0.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.footer-logo-img {
    height: 30px;
    width: auto;
    margin-right: 0.5rem;
    border-radius: 6px;
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: linear-gradient(45deg, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.2));
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

.user-dropdown a:hover {
    background: rgba(147, 51, 234, 0.1);
}

.user-dropdown a i {
    margin-right: 0.5rem;
    width: 20px;
}

/* Update existing nav-item styles */
.nav-item.auth-nav {
    display: none;
}

.nav-item.auth-nav.show {
    display: block;
}

/* Profile Section Styles */
.profile-content {
    max-width: 600px;
    margin: 0 auto;
}

/* More aggressive white space removal */
body {
    overflow-x: hidden;
}

/* Fix for profile/settings white space */
.main-content {
    min-height: calc(100vh - 80px);
    transition: all 0.3s ease;
}

/* When showing auth sections (profile, settings, etc.), reduce the height */
.main-content.auth-active {
    min-height: auto;
    padding: 2rem 0;
}

/* Adjust auth-section for better fit */
.auth-section {
    min-height: auto;
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
}

/* Better profile/settings container sizing */
.auth-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Premium Modal Styles */
.premium-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.premium-modal.active {
    display: flex;
}

.premium-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.premium-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 25px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
}

.premium-modal-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 25px 25px 0 0;
    text-align: center;
    position: relative;
}

.premium-modal-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.premium-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.premium-modal-body {
    padding: 2rem;
}

.premium-features h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.premium-features ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.premium-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-features li i {
    color: #10b981;
    font-size: 1.2rem;
}

.premium-pricing {
    text-align: center;
}

.price-tag {
    margin-bottom: 2rem;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.period {
    color: var(--text-secondary);
    font-size: 1rem;
}

.premium-note {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(147, 51, 234, 0.1);
    border-radius: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* PayPal Button Styling */
#paypal-button-container {
    margin: 1rem 0;
    min-height: 50px;
}

/* Profile section specific fixes */
#profileSection,
#settingsSection {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1);
    margin: 0 auto;
    max-width: 600px;
    margin-bottom: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content.auth-active {
        padding: 1rem 0;
    }
    
    .auth-container {
        padding: 0 0.5rem;
    }
    
    #profileSection,
    #settingsSection {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

.main-content {
    min-height: calc(100vh - 80px);
    transition: all 0.3s ease;
}

/* Override min-height for auth sections */
.main-content:has(.auth-section[style*="flex"]) {
    min-height: auto !important;
    padding: 0 !important;
}

/* Or use this class-based approach */
.main-content.auth-active {
    min-height: auto !important;
    padding: 0 !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
}

/* Make auth-section take full available space */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* For profile/settings specifically */
#profileSection,
#settingsSection {
    
    max-width: 600px;
    width: 100%;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    border-radius: 15px;
}

.profile-avatar-container {
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #9333ea;
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 3px solid white;
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
}

.profile-info h3 {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.profile-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-stats i {
    color: #9333ea;
}

.profile-form {
    margin-top: 2rem;
}

/* Settings Section Styles */
.settings-content {
    max-width: 600px;
    margin: 0 auto;
}

.settings-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1);
}

.settings-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-section h3 i {
    font-size: 1.1rem;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Admin Tag Styles */
.admin-tag {
    background: linear-gradient(45deg, #f59e0b, #ef4444);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* User Management Styles */
.user-management {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1);
    margin-top: 2rem;
}

.user-management h2 {
    background: linear-gradient(45deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.user-table th,
.user-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.user-table th {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    font-weight: 600;
    color: #333;
}

.user-table tr:hover {
    background: rgba(147, 51, 234, 0.02);
}

.user-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-status.active {
    background: #10b981;
    color: white;
}

.user-status.inactive {
    background: #ef4444;
    color: white;
}

.user-role {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-role.admin {
    background: linear-gradient(45deg, #f59e0b, #ef4444);
    color: white;
}

.user-role.user {
    background: #6366f1;
    color: white;
}

.btn-toggle {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-toggle.activate {
    background: #10b981;
}

.btn-toggle.activate:hover {
    background: #059669;
}

.btn-toggle.deactivate {
    background: #ef4444;
}

.btn-toggle.deactivate:hover {
    background: #dc2626;
}

/* Maximum specificity approach */
body > main.main-content.auth-active {
    min-height: 0 !important;

    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

/* Ultra-specific targeting */
body > main.main-content.auth-active > section#authSection {
    width: 100% !important;
    max-width: none !important;
    min-height: 100px !important;
    padding: 2rem !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    margin-top: 120px !important;
    justify-content: center !important;
}

/* Ensure all auth sections are hidden by default */
/* Ensure all auth sections are hidden by default */
/* Ensure all auth sections are hidden by default */
/* Ensure all auth sections are hidden by default */

/* Section-specific overrides */
body > main.main-content.profile-active > section#authSection > div#profileSection {
    display: block !important;
    margin: 0 !important;
    max-width: 600px !important;
    width: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1) !important;
    background: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
}

body > main.main-content.dream-active > section#authSection > div#dreamupSection {
    display: block !important;
    margin: 0 !important;
    max-width: 600px !important;
    width: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1) !important;
    background: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
}

body > main.main-content.settings-active > section#authSection > div#settingsSection {
    display: block !important;
    margin: 0 !important;
    max-width: 600px !important;
    width: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1) !important;
    background: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
}

body > main.main-content.gallery-active > section#authSection > div#gallerySection {
    display: block !important;
    margin: 0 !important;
    max-width: 600px !important;
    width: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1) !important;
    background: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
}

body > main.main-content.users-active > section#authSection > div#usersSection {
    display: block !important;
    margin: 0 !important;
    max-width: 600px !important;
    width: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1) !important;
    background: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
}

/* Main content active state */
.main-content.auth-active {
    min-height: 0 !important;
    padding: 0 !important;
    margin-top: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

.main-content.dreamup-active {
    min-height: 0 !important;
    padding: 0 !important;
    margin-top: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

/* Ensure main-content reduces height for users section */
.main-content.users-active {
    min-height: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

/* GLM's brilliant fix */
.main-content.auth-active { min-height: 0 !important; }
.auth-section.auth-active { min-height: 0 !important; }

/* Gallery section override - Ensure proper specificity and properties */
body > main.main-content.gallery-active > section#authSection > div#gallerySection {
    margin: 0 !important;
    max-width: 600px !important;
    width: 100% !important;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.1) !important;
    background: white !important;
    padding: 2rem !important;
    border-radius: 15px !important;
    margin: 0 auto !important;
    max-width: 600px !important;
}

/* Ensure main-content reduces height for gallery */
.main-content.gallery-active {
    min-height: 0 !important;
    padding: 0 !important;
    margin-top: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

.main-content.dreamup-active {
    height: 220px;
    min-height: 0 !important;
    padding: 0 !important;
    margin-top: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

.cup-hot {
  position: relative;
  font-size: 4rem;
  color: #ff6b6b;
}

.cup-hot .steam {
  position: absolute;
  width: 10px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
  top: -50px;
  left: 50%;
  animation: steam 2s infinite;
}

.hover-grow
{
    width: 50%;
    border-style: solid;
    border-color: #ec4899;
    border-width: 2px;
    box-shadow: 0px 0px 25px 5px #ec4899;

}

@keyframes steam {
  0% { transform: translateY(0) scale(1); opacity: 0.3; }
  100% { transform: translateY(-20px) scale(1.5); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        z-index: 2;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
        z-index: 2;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .user-table {
        font-size: 0.9rem;
    }
    
    .user-table th,
    .user-table td {
        padding: 0.5rem;
    }
}

/* Theme Variables */
:root {
    /* Light Mode (Default) */
    --bg-primary: linear-gradient(135deg, #ffffff 0%, #f8f9ff 50%, #fff5f8 100%);
    --bg-secondary: white;
    --bg-header: rgba(255, 255, 255, 0.95);
    --bg-auth: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    --text-primary: #333;
    --text-secondary: #6b7280;
    --text-inverse: white;
    --border-color: #e5e7eb;
    --shadow-light: rgba(147, 51, 234, 0.1);
    --shadow-medium: rgba(147, 51, 234, 0.15);
    --shadow-heavy: rgba(147, 51, 234, 0.2);
    --primary-gradient: linear-gradient(45deg, #9333ea, #ec4899);
    --primary-color: #9333ea;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-secondary: #1e293b;
    --bg-header: rgba(17, 50, 89, 0.95);
    --bg-auth: linear-gradient(135deg, rgba(17, 50, 89, 0.3), rgba(30, 41, 59, 0.3));
    --text-primary: #f8f9ff;
    --text-secondary: #cbd5e1;
    --text-inverse: #1e293b;
    --border-color: #475569;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.4);
    --primary-gradient: linear-gradient(45deg, #a855f7, #f472b6);
    --primary-color: #a855f7;
    --secondary-color: #f472b6;
    --success-color: #22c55e;
    --error-color: #f87171;
}

/* Apply theme variables to existing styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: var(--transition);
}

/* Navigation with theme support */
.navbar {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

/* Auth forms with theme support */
.auth-form {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-medium);
    animation: fadeInUp 0.6s ease-out;
    color: var(--text-primary);
    border-width: 1px;
    border-color: #ec4899;
    border-style: solid;
    box-shadow: 0px 0px 25px 5px #ec4899;
}

/* Auth section with theme support */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-auth);
    transition: var(--transition);
}

/* Form inputs with theme support */
.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Feature cards with theme support */
.feature-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: var(--transition);
    text-align: center;
    color: var(--text-primary);
}

/* Buttons with theme support */
.btn-secondary {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
    box-shadow: 0 5px 15px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.theme-toggle i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.theme-toggle:hover i {
    color: var(--secondary-color);
}

/* Profile/Settings sections with theme support */
#profileSection,
#settingsSection {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    margin: 0 auto;
    max-width: 600px;
    color: var(--text-primary);
}

.settings-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px var(--shadow-light);
    color: var(--text-primary);
}

.profile-header {
    background: var(--bg-auth);
    color: var(--text-primary);
}

/* User dropdown with theme support */
.user-dropdown {
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--shadow-light);
    color: var(--text-primary);
}

.user-dropdown a {
    color: var(--text-primary);
}

.user-dropdown a:hover {
    background: rgba(147, 51, 234, 0.1);
}

/* Admin panel with theme support */
.admin-form,
.user-management {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.user-table th,
.user-table td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.user-table th {
    background: var(--bg-auth);
    color: var(--text-primary);
}

.user-table tr:hover {
    background: rgba(147, 51, 234, 0.02);
}

/* Toast notifications with theme support */
.toast {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 10px 30px var(--shadow-light);
}

/* Footer with theme support */
.footer {
    background: var(--primary-gradient);
    color: var(--text-inverse);
}

/* Smooth theme transition */
* {
    transition: background-color var(--transition), 
                color var(--transition), 
                border-color var(--transition),
                box-shadow var(--transition);
}
/* Better focus states for keyboard navigation */
.nav-link:focus,
.btn:focus,
.form-group input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-gradient);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Then use throughout */
.btn-primary {
    background: var(--primary-gradient);
    transition: var(--transition);
}

/* Enhanced Admin Tags for Public Users */
.user-card-admin {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(147, 51, 234, 0.05));
    position: relative;
    overflow: hidden;
}

.user-card-admin::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.user-card-admin::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(168, 85, 247, 0.03), transparent);
    animation: adminShimmer 3s ease-in-out infinite;
}

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

.user-card-name .admin-tag-public {
    background: var(--primary-gradient);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
    animation: adminGlow 2s ease-in-out infinite alternate;
}

@keyframes adminGlow {
    from { 
        box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
        transform: scale(1);
    }
    to { 
        box-shadow: 0 4px 12px rgba(147, 51, 234, 0.5);
        transform: scale(1.05);
    }
}

/* Admin Crown Icon */
.admin-crown {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
    z-index: 10;
    animation: crownFloat 3s ease-in-out infinite;
}

.admin-crown i {
    color: white;
    font-size: 1rem;
}

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

/* Admin Stats Special Styling */
.user-card-admin .user-card-stats {
    border-top: 2px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(147, 51, 234, 0.05), transparent);
}

.user-card-admin .user-card-stat i {
    color: var(--primary-color);
    font-weight: bold;
}

/* Dark Mode Admin Styling */
[data-theme="dark"] .user-card-admin {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(168, 85, 247, 0.1));
}
[data-theme="dark"] .play-item {
    background: rgba(17, 50, 89, 0.95);
}

[data-theme="dark"] .nav-menu
{
    background: var(--bg-header);
}

[data-theme="dark"] #loginForm
{
    background: var(--bg-secondary);
}

/* Admin Gallery Styles */
.gallery-item.admin-gallery-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: var(--transition);
    cursor: default;
}

.gallery-item.admin-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.gallery-item-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gallery-item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.gallery-item-info {
    margin-bottom: 1rem;
}

.gallery-item-info h4 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
}

.gallery-item-info p {
    font-size: 0.9rem;
    margin: 0.25rem 0;
    opacity: 0.9;
}

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

/* Gallery Management Styles */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.filter-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

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

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gallery-item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-image-container img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    color: white;
}

.gallery-item-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.gallery-item-info p {
    margin: 0.25rem 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.gallery-item-actions {
    display: flex;
    justify-content: flex-end;
}

.gallery-item-stats {
    padding: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.gallery-item-stats {
    padding: 1rem;
    background: var(--bg-auth);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

[data-theme="dark"] .user-card-admin::after {
    background: linear-gradient(45deg, transparent, rgba(168, 85, 247, 0.05), transparent);
}

[data-theme="dark"] .admin-crown {
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.6);
}

/* Admin Priority in Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Admin cards get more space */
.user-card-admin {
    grid-column: span 1;
}

/* AI Chat Interface Styles */
.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-window {
    transition: all 0.3s ease;
}

.chat-window.collapsed {
    height: 60px;
    overflow: hidden;
}

.chat-window.expanded {
    height: 80vh;
}

/* Add this to your style.css */
/* Mobile-specific styles */
@media (max-width: 768px) {
    
    .chat-window {
        height: 60vh !important; /* Use viewport height */
        max-height: 75vh; /* Limit max height */
        z-index: 99999 !important;
    }
    
    .chat-messages {
        height: 40vh; /* Leave space for input */
    }
    
}

@media (min-width: 768px) {

    .chat-window {
        width: 70%;
        height: 500px !important;

    }
    
    .chat-input-container {

        z-index: 99999 !important;
    }
    
    .chat-controls {

    }
}

/* DreamUp Styles */
.dreamup-status {
    display: flex;
    justify-content: space-between;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-item i {
    color: var(--primary-color);
}

.purchase-credits {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.purchase-credits h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.purchase-credits p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.generated-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

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

.user-gallery {
    margin-top: 2rem;
}

.user-gallery h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.user-gallery .gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--card-bg);
}

.user-gallery .gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.user-gallery .gallery-info {
    padding: 0.5rem;
}

.user-gallery .gallery-info p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-gallery .gallery-info small {
    color: var(--text-secondary);
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Mobile layout */
@media (max-width: 767px) {
    .chat-window {
        width: 100%;
        height: 100vh;
    }
    
    .chat-input-container {
        width: 100%;
    }
    
    .chat-controls {
        width: 100%;
    }
}

/* Chat Toggle Button */
.chat-toggle-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px var(--shadow-medium);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px var(--shadow-heavy);
}

.chat-toggle-btn:active {
    transform: scale(0.95);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

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

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-heavy);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

/* Chat Header */
.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-header-text h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.chat-status {
    font-size: 0.8rem;
    opacity: 0.9;
}

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

.chat-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* Welcome Message */
.chat-welcome {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.welcome-avatar {
    width: 35px;
    height: 35px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.welcome-text h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.welcome-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Chat Message */
.chat-message {
    display: flex;
    gap: 0.5rem;
    animation: messageSlide 0.3s ease-out;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.chat-message.ai .chat-message-avatar {
    background: var(--primary-gradient);
    color: white;
}

.chat-message.user .chat-message-avatar {
    background: var(--border-color);
    color: var(--text-primary);
}

.chat-message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.ai .chat-message-content {
    background: var(--bg-auth);
    color: var(--text-primary);
    border-bottom-left-radius: 5px;
}

.chat-message.user .chat-message-content {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 5px;
}

/* Chat Input */
.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.chat-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-auth);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    max-width: 70%;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

/* Admin Profile Management Styles */
.admin-profile-preview {
    margin-bottom: 2rem;
}

.profile-preview-card {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.profile-preview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(147, 51, 234, 0.03), transparent);
    animation: adminShimmer 3s ease-in-out infinite;
}

.profile-preview-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.profile-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

.admin-crown-small {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 35px;
    height: 35px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
    color: white;
    font-size: 0.9rem;
    animation: crownFloat 3s ease-in-out infinite;
}

.profile-preview-info h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-role-badge {
    background: linear-gradient(45deg, #f59e0b, #ef4444);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Avatar Upload Styles */
.avatar-upload-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.avatar-upload-preview {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    border: 3px dashed var(--border-color);
    overflow: hidden;
    position: relative;
    background: var(--bg-auth);
}

.avatar-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2rem;
}

.avatar-upload-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

/* Form Enhancements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Social Links */
.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.social-link-input:hover {
    border-color: var(--primary-color);
}

.social-link-input i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
}

.social-link-input input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.social-link-input input::placeholder {
    color: var(--text-secondary);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .avatar-upload-container {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-preview-card {
        flex-direction: column;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .profile-preview-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(244, 114, 182, 0.1));
}

[data-theme="dark"] .social-link-input {
    background: var(--bg-secondary);
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

/* Profile Modal Styles */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.profile-modal.active {
    display: flex;
}

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

.profile-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.profile-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s ease-out;
    border: 2px solid var(--border-color);
}

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

.profile-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
}

.profile-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

/* Profile Header */
.profile-modal-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 25px 25px 0 0;
    text-align: center;
    position: relative;
}

.profile-modal-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.profile-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
}

.profile-status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-status-indicator.active {
    background: #10b981;
}

.profile-status-indicator.inactive {
    background: #ef4444;
}

.profile-modal-info h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-modal-role {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.role-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: linear-gradient(45deg, #f59e0b, #ef4444);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

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

/* Profile Stats */
.profile-modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-auth);
    border-radius: 15px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-light);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Bio */
.profile-modal-bio {
    padding: 1.5rem;
}

.profile-modal-bio h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.profile-modal-bio h3 i {
    color: var(--primary-color);
}

.profile-modal-bio p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    background: var(--bg-auth);
    padding: 1rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

/* Profile Actions */
.profile-modal-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid var(--border-color);
}

.profile-modal-actions .btn {
    flex: 1;
    max-width: 200px;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .profile-modal-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .profile-modal-actions {
        flex-direction: column;
    }
    
    .profile-modal-actions .btn {
        max-width: 100%;
    }
    
    .profile-modal-header {
        padding: 1.5rem;
    }
    
    .profile-modal-avatar {
        width: 100px;
        height: 100px;
    }
    
    .avatar-fallback {
        font-size: 2.5rem;
    }
}

/* Dark Mode Specifics */
[data-theme="dark"] .profile-modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .profile-modal-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(244, 114, 182, 0.1));
}

[data-theme="dark"] .stat-item {
    background: rgba(168, 85, 247, 0.05);
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .chat-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .chat-window {
        width: 100%;
        height: 400px;
        border-radius: 15px 15px 0 0;
        bottom: 70px;
    }
    
    .chat-message-content {
        max-width: 80%;
    }
}

@media (min-width: 768px) {
    .users-grid {
        grid-auto-flow: dense;
    }
    .user-card-admin {
        grid-row: span 1;
    }
}

/* Section transitions */
.section-transitioning {
    pointer-events: none; /* Prevent clicks during transition */
}

.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fade-in {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

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

/* Prevent content shift during transitions */
.main-content {
    margin-top: 150px !important;
    position: relative;
    min-height: calc(100vh - 80px);
    overflow: hidden;
}

.auth-section {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* Performance optimizations for large galleries */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    /* Add these for better performance with many images */
    contain: layout;
    will-change: transform;
}

.gallery-item {
    /* Add these for smoother animations with many items */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Add a loading indicator for large galleries */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.gallery-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

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