/* 
   CAPCRAFT — Cosmic Aura Design System (Traditional PHP Port)
   Baseado no visual React / Tailwind / Lucide
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700;900&family=JetBrains+Mono&display=swap');

:root {
    --radius: 0.75rem;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --radius-2xl: calc(var(--radius) + 8px);
    --radius-3xl: calc(var(--radius) + 12px);

    /* Deep cosmic purple/black foundation */
    --background: #0d0915;
    --foreground: #f8f7f9;
    --card: #1b1326;
    --card-foreground: #f8f7f9;
    --popover: #1a1425;
    --popover-foreground: #f8f7f9;

    /* Royal violet primary */
    --primary: #9b59b6;
    --primary-foreground: #ffffff;

    --secondary: #221832;
    --secondary-foreground: #f8f7f9;
    --muted: #211a2e;
    --muted-foreground: #a098b0;
    --accent: #8e44ad;
    --accent-foreground: #ffffff;

    --destructive: #e74c3c;
    --destructive-foreground: #ffffff;
    --success: #2ecc71;
    --warning: #f1c40f;
    --neon: #bf55ec;

    --border: rgba(255, 255, 255, 0.08);
    --input: rgba(255, 255, 255, 0.12);
    --ring: #9b59b6;

    --sidebar: #0b0813;
    --sidebar-foreground: #ece9f0;
    --sidebar-primary: #9b59b6;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #20172e;
    --sidebar-accent-foreground: #f8f7f9;
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --sidebar-ring: #9b59b6;

    /* Signature gradients */
    --gradient-hero: radial-gradient(ellipse at top, rgba(155, 89, 182, 0.3), transparent 60%),
                     radial-gradient(ellipse at bottom right, rgba(142, 68, 173, 0.2), transparent 50%),
                     linear-gradient(180deg, #0d0915, #090613);
    --gradient-primary: linear-gradient(135deg, #9b59b6, #8e44ad);
    --gradient-neon: linear-gradient(135deg, #bf55ec, #9b59b6);
    --gradient-card: linear-gradient(160deg, rgba(32, 23, 46, 0.8), rgba(22, 16, 36, 0.6));
    
    --shadow-glow: 0 0 40px rgba(155, 89, 182, 0.35);
    --shadow-card: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
    --shadow-elegant: 0 10px 40px -10px rgba(155, 89, 182, 0.4);

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-sans: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: var(--border);
}

html {
    color-scheme: dark;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(155, 89, 182, 0.15), transparent),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(142, 68, 173, 0.1), transparent);
    background-attachment: fixed;
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Utilities */
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-neon { background: var(--gradient-neon); }
.bg-gradient-card { background: var(--gradient-card); }
.shadow-glow { box-shadow: var(--shadow-glow); }
.shadow-elegant { box-shadow: var(--shadow-elegant); }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass {
    background: rgba(27, 19, 38, 0.6);
    backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-premium {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-premium-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(155, 89, 182, 0.5);
    box-shadow: var(--shadow-elegant);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    shadow: var(--shadow-elegant);
}
.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
}

.btn-outline {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--foreground);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(155, 89, 182, 0.6);
}

/* Sidebar & Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16rem;
    background: var(--sidebar);
    border-right: 1px solid var(--sidebar-border);
    z-index: 40;
    transition: transform 0.3s ease;
}

.main-content {
    margin-left: 16rem;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

.sidebar-nav {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(236, 233, 240, 0.8);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8f7f9;
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-elegant);
}

/* Header */
.top-header {
    position: sticky;
    top: 0;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    background: rgba(13, 9, 21, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 30;
}

/* Animations */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up 0.6s ease-out forwards; }

/* Grid & Spacing */
.container-aura {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.grid-aura {
    display: grid;
    gap: 1.25rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
}
