/* 
   STITCH Design System - Premium UI
   Enhanced for high-professional visual experience.
*/

:root {
    /* Color Palette - Cyber Sleek */
    --accent: #00F2FF;
    --accent-glow: rgba(0, 242, 255, 0.3);
    --primary: #3E7BFF;
    --primary-glow: rgba(62, 123, 255, 0.4);
    
    --bg-dark: #05070A;
    --bg-surface: #0D1117;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --text-high: #FFFFFF;
    --text-mid: #A0AEC0;
    --text-low: #718096;
    
    /* System Tokens */
    --unit: 8px;
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --blur: 24px;
    
    /* Animations */
    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-high);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    line-height: 1.5;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(62, 123, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 242, 255, 0.05) 0%, transparent 40%);
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

/* Premium Typography */
h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0;
    background: linear-gradient(180deg, #FFF 0%, #A0AEC0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-mid);
    max-width: 800px;
    margin: 1.5rem auto 3rem;
}

/* Innovative Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: var(--text-mid);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 100px;
    transition: all 0.3s var(--smooth);
}

.nav-link:hover {
    color: var(--text-high);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 12px;
    display: grid;
    place-items: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Interactive Elements */
.actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-premium {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s var(--smooth);
    box-shadow: 0 4px 15px var(--primary-glow);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-premium.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: white;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-premium.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.masonry-grid {
    column-count: 3;
    column-gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}

.masonry-full-width {
    column-span: all;
    width: 100%;
    display: block;
}

@media (max-width: 1024px) {
    .masonry-grid { column-count: 2; }
}

@media (max-width: 640px) {
    .masonry-grid { column-count: 1; }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    display: block;
    width: 100%;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    border-radius: var(--radius-xl);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-xl);
}

.premium-card {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border-glass);
    transition: all 0.4s var(--smooth);
}

.premium-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

/* Magnetic Area placeholder */
/* Auth UI */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-cover: cover;
}

.hidden { display: none !important; }
.w-full { width: 100%; }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    display: grid;
    place-items: center;
    z-index: 1000;
}

.modal-content {
    width: 90%;
    max-width: 420px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: #0D1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 1);
    border-radius: var(--radius-xl);
}

.modal-content h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.modal-content p {
    color: var(--text-mid);
    margin: 0;
    font-size: 1.1rem;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.divider {
    font-size: 0.8rem;
    color: var(--text-low);
    display: flex;
    align-items: center;
    gap: 10px;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.glass-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: white;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s var(--smooth);
}

.glass-input:focus {
    border-color: var(--primary);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-low);
    font-size: 0.9rem;
    cursor: pointer;
}

.magnetic-area {
    position: relative;
    display: block;
    width: 100%;
}

/* Toast Notifications */
.toast-container { position: fixed; top: 2rem; right: 2rem; z-index: 10000; display: flex; flex-direction: column; gap: 1rem; }
.toast { padding: 1rem 1.5rem; background: rgba(20, 20, 25, 0.9); backdrop-filter: blur(20px); border: 1px solid var(--border-glass); border-radius: var(--radius-md); color: white; display: flex; align-items: center; gap: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slideIn 0.3s var(--smooth) forwards; min-width: 300px; }
.toast.success { border-left: 4px solid #34A853; }
.toast.error { border-left: 4px solid #EA4335; }
.toast.info { border-left: 4px solid var(--primary); }
.toast-icon { font-size: 1.5rem; }
.toast-content h4 { margin: 0; font-size: 0.9rem; font-weight: 700; }
.toast-content p { margin: 0; font-size: 0.8rem; color: var(--text-mid); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.fade-out { animation: fadeOut 0.3s var(--smooth) forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-20px); } }
