/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */

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

/* ========================================
   BODY & ROOT STYLES
   ======================================== */

body {
    font-family: var(--app-interface-font);
    background: linear-gradient(135deg, var(--app-bg-color1) 0%, var(--app-bg-color2) 50%, var(--app-bg-color3) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Aplicar cor base - todos os elementos herdam */
body {
    color: var(--text-primary);
}

/* Links com estilo do tema */
a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: var(--text-primary);
    }

/* Efeito de fundo radial */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(120, 119, 198, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   TYPOGRAPHY - HEADINGS & TEXT
   ======================================== */

/* Headings base */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

/* H1 - Título Principal */
h1 {
    font-size: 2.5rem; /* 40px */
    margin-bottom: 1.5rem; /* 24px */
    font-weight: 700;
}

/* H2 - Subtítulo */
h2 {
    font-size: 2rem; /* 32px */
    margin-bottom: 1.25rem; /* 20px */
}

/* H3 - Seção */
h3 {
    font-size: 1.75rem; /* 28px */
    margin-bottom: 1rem; /* 16px */
}

/* H4 - Subseção */
h4 {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 0.875rem; /* 14px */
}

/* H5 - Título Menor */
h5 {
    font-size: 1.25rem; /* 20px */
    margin-bottom: 0.75rem; /* 12px */
}

/* H6 - Título Mínimo */
h6 {
    font-size: 1rem; /* 16px */
    margin-bottom: 0.5rem; /* 8px */
}

/* Headings dentro de cards - remove margem superior */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.glass h1, .glass h2, .glass h3, .glass h4, .glass h5, .glass h6 {
    margin-top: 0;
}

/* Parágrafos */
p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

    p:last-child {
        margin-bottom: 0;
    }

/* Small text */
small, .text-small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Texto strong/bold */
strong, b {
    font-weight: 600;
    color: var(--text-primary);
}

/* Texto em itálico */
em, i {
    font-style: italic;
}

/* Listas */
ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

    li:last-child {
        margin-bottom: 0;
    }

/* Blockquotes */
blockquote {
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--app-primary-color);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary);
}

/* Code */
code {
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

pre {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

    pre code {
        padding: 0;
        background: none;
    }

/* Utilities de texto */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-disabled {
    color: var(--text-disabled) !important;
}

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

.text-left {
    text-align: left;
}

.text-start {
    text-align: start;
}

.text-right {
    text-align: right;
}

.text-end {
    text-align: end;
}

/* ========================================
   CONTAINERS & SPACING
   ======================================== */

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.container-fluid {
    width: 100%;
    padding: 2rem;
}

/* Seções de conteúdo */
.section {
    margin-bottom: 2rem;
}

    .section:last-child {
        margin-bottom: 0;
    }

/* Content block com espaçamento automático entre elementos */
.content-block > * + * {
    margin-top: 1rem;
}

/* Responsividade para containers */
@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1.125rem;
    }

    h6 {
        font-size: 1rem;
    }
}
