/* =========================================================================
   RESET & FOUNDATION
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores de Identidade (Core) */
    --color-primary: #64E9FF;
    --color-secondary: #C0A0FF;
    --color-tertiary: #FF9F7C;
    
    /* Estados (Support) */
    --color-success: #9ED9A9;
    --color-warning: #FFD966;
    --color-error: #FF9F7C;
    --color-info: #8AC4FF;
    
    /* Cores de Projeto */
    --color-proj-1: #64E9FF;
    --color-proj-2: #C0A0FF;
    --color-proj-3: #A0EAC0;
    --color-proj-4: #FFB9B9;
    --color-proj-5: #FFD966;
    --color-proj-6: #8AC4FF;
    --color-proj-7: #9ED9A9;
    
    /* Neutros */
    --gray-100: #1A1D23;
    --gray-200: #24282F;
    --gray-300: #2F343D;
    --gray-400: #3F4550;
    --gray-500: #6B7280;
    --gray-600: #9CA3AF;
    --gray-700: #D1D5DB;
    --gray-800: #E5E9F0;
    --gray-900: #F3F6FF;
    
    /* Tipografia */
    --font-display: 'Sora', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'DM Mono', monospace;
    
    /* Espaçamentos - harmônicos */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Sombras - suaves, etéreas */
    --shadow-sm: 0 8px 20px -6px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.02);
    --shadow-md: 0 15px 30px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-xl: 0 35px 70px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(100, 233, 255, 0.1);
    
    /* Bordas - suavemente arredondadas, orgânicas */
    --radius-sm: 16px;
    --radius-md: 24px;
    --radius-lg: 32px;
    --radius-xl: 40px;
    --radius-full: 1000px;
    --radius-blob: 60% 40% 50% 50% / 40% 50% 50% 60%;
    
    /* Transições - muito suaves */
    --transition-float: 400ms cubic-bezier(0.2, 0.9, 0.3, 1);
    --transition-soft: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce-soft: 500ms cubic-bezier(0.34, 1.2, 0.64, 1);
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================================================
   TIPOGRAFIA FLUIDA
   ========================================================================= */
h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    position: relative;
    display: inline-block;
}

h1 { font-size: clamp(2.2rem, 8vw, 4rem); }
h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p { font-size: 1rem; color: var(--gray-600); }

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* =========================================================================
   LAYOUT MOBILE-FIRST
   ========================================================================= */
.ds-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem; /* Reduzido de 1rem para economizar espaço no mobile */
}

.ds-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    text-align: left;
}

@media (min-width: 768px) {
    .ds-container { padding: 2rem; }
}

.ds-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.ds-nav a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-soft);
}

.ds-nav a:hover { color: var(--color-primary); }

/* Seções */
.ds-section {
    padding: clamp(var(--space-md), 5vw, var(--space-lg));
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-xl);
}

.ds-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .ds-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
}

@media (min-width: 1024px) {
    .ds-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   COMPONENTES
   ========================================================================= */

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-float);
    border: 1px solid transparent;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-decoration: none;
}

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

.btn--primary {
    background: rgba(100, 233, 255, 0.1);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--secondary {
    background: rgba(192, 160, 255, 0.1);
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn--xs { padding: 0.25rem 0.6rem; font-size: 0.7rem; letter-spacing: 0.05em; }
.btn--sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn--lg { padding: 1.2rem 2.5rem; font-size: 1.25rem; }
.btn--xl { padding: 1.8rem 4rem; font-size: 1.6rem; }

/* Cards */
.card {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-float);
}

@media (min-width: 768px) {
    .card:hover { transform: translateY(-5px); }
}

/* Forms */
.form-group { margin-bottom: var(--space-md); }

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-soft);
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
}

/* Checkbox e Radio */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    position: relative;
    transition: all var(--transition-soft);
}

input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .switch-slider { background: var(--color-primary); }
input:checked + .switch-slider:before { transform: translateX(24px); }

/* =========================================================================
   COMPLEMENTOS (TOASTS, SPINNER, etc.)
   ========================================================================= */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .toast-container {
        left: auto;
        width: 350px;
    }
}

.toast {
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

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

.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

@keyframes softPulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* =========================================================================
   NAVEGAÇÃO GLOBAL (MOBILE NAV)
   ========================================================================= */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 10, 15, 0.85); /* Fundo muito escuro com transparência */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom); /* Suporte a notch do iPhone */
}

.mobile-nav__item {
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 6px;
    padding: var(--space-sm);
    transition: all 0.3s ease;
    flex: 1; /* Garante distribuição igual */
}

.mobile-nav__item.active {
    color: var(--color-primary);
}

.mobile-nav__item.active i {
    filter: drop-shadow(0 0 10px rgba(100, 233, 255, 0.5));
}

.mobile-nav__text {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.profile-submenu.show-submenu {
    display: flex !important;
    animation: slideUpPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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