@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --background: #050403;
    --background-secondary: #0d0a06;
    --surface: #120f0a;
    --surface-light: #1b160d;
    --primary: #d4af37;
    --primary-hover: #fff0a6;
    --primary-glow: rgba(212, 175, 55, 0.18);
    --secondary: #c99b2e;
    --secondary-hover: #eadb9b;
    --secondary-glow: rgba(212, 175, 55, 0.15);
    --text-primary: #eee9da;
    --text-secondary: #aaa28f;
    --text-muted: #756d5e;
    --border: rgba(212, 175, 55, 0.18);
    --border-hover: rgba(212, 175, 55, 0.45);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --info-surface: rgba(59, 130, 246, 0.08);
    --info-text: #bfdbfe;
    --info-heading: #60a5fa;
    --tip-surface: rgba(16, 185, 129, 0.08);
    --tip-text: #a7f3d0;
    --tip-heading: #34d399;
    --warning-surface: rgba(245, 158, 11, 0.08);
    --warning-text: #fde68a;
    --warning-heading: #fbbf24;
    --requirement-surface: rgba(239, 68, 68, 0.08);
    --requirement-text: #fca5a5;
    --requirement-heading: #f87171;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 230px;
    --header-height: 80px;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
    --background: #ffffff;
    --background-secondary: #f7f7f8;
    --surface: #ffffff;
    --surface-light: #f1f3f5;
    --primary: #79580d;
    --primary-hover: #4b3506;
    --primary-glow: rgba(121, 88, 13, 0.14);
    --secondary: #85610e;
    --secondary-hover: #523a06;
    --secondary-glow: rgba(133, 97, 14, 0.12);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border: #d9dde3;
    --border-hover: #aeb5bf;
    --success: #15803d;
    --danger: #b91c1c;
    --warning: #a16207;
    --info: #1d4ed8;
    --info-surface: #eff6ff;
    --info-text: #1e3a8a;
    --info-heading: #1d4ed8;
    --tip-surface: #f0fdf4;
    --tip-text: #14532d;
    --tip-heading: #166534;
    --warning-surface: #fffbeb;
    --warning-text: #78350f;
    --warning-heading: #92400e;
    --requirement-surface: #fef2f2;
    --requirement-text: #7f1d1d;
    --requirement-heading: #991b1b;
}

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

body {
    background-color: var(--background);
    background-image:
        radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.09) 0%, transparent 38%),
        radial-gradient(circle at 85% 80%, rgba(192, 192, 180, 0.05) 0%, transparent 38%),
        linear-gradient(rgba(5, 4, 3, 0.15), rgba(5, 4, 3, 0.35));
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-image: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    text-align: center;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Layout Framework */
#app-layout {
    display: flex;
    min-height: 100vh;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(5, 4, 3, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    transition: var(--transition);
}

[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.94);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: var(--transition);
}

.header-social-link:hover {
    color: #000000;
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 15px var(--secondary-glow);
    transform: translateY(-2px);
}

.header-social-link svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-social-link .social-icon-fill {
    fill: currentColor;
    stroke: none;
}

/* Header Search */
.header-search {
    position: relative;
    width: 320px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.global-search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    z-index: 110;
    display: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.search-results.active {
    display: block;
}

.search-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover, .search-item.highlighted {
    background: var(--surface-light);
}

.search-item .search-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.search-item .search-category {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.search-item .search-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sidebar styling */
.main-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--background-secondary), var(--background));
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    overflow-y: auto;
    z-index: 90;
    transition: var(--transition);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-group-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1rem 0 0.5rem 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.06);
}

.nav-item.active {
    border-left: 3px solid var(--primary);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.04));
}

.nav-dropdown-arrow {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    fill: none;
    stroke: var(--secondary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

/* Main Area Container */
.main-container {
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

.content-wrapper {
    flex: 1;
    padding: 2.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Footer styling */
.main-footer {
    background: linear-gradient(180deg, var(--background-secondary), var(--background));
    border-top: 1px solid var(--border);
    padding: 3rem 2.5rem 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-about p {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 400px;
}

.footer-links h4 {
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* UI Elements & Components */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #352706, #765712);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.2);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.45);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5b420d, #a77d1c);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: #000000;
    box-shadow: 0 0 15px var(--secondary-glow);
}

.theme-toggle {
    justify-content: center;
    width: 2.75rem;
    height: 2.5rem;
    padding: 0.5rem;
}

.theme-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scroll-to-top {
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0.5rem;
}

.scroll-top-icon {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-primary);
}

.btn-icon:hover {
    background: var(--surface-light);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.wiki-card {
    background: linear-gradient(145deg, var(--surface), var(--background-secondary));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wiki-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38), 0 0 18px var(--primary-glow);
}

.card-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.card-icon img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.card-icon img[src$="craft20x20.png"] {
    width: 20px;
    height: 20px;
}

.system-page-card h2 > img {
    width: 20px;
    height: 20px;
    vertical-align: -0.2em;
    object-fit: contain;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Tópicos importantes da página inicial */
.important-topics {
    --important-topics-padding: 2rem;
    margin: 0 0 1rem;
    padding: 0 var(--important-topics-padding) var(--important-topics-padding);
    background: linear-gradient(145deg, var(--surface), var(--background-secondary));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.important-topics-header {
    margin: 0 calc(0px - var(--important-topics-padding)) 1.25rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, #765000 0%, #a97808 55%, #c99b2e 100%);
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
    box-shadow: 0 5px 16px rgba(83, 55, 0, 0.25);
    text-align: left;
}

.important-topics-header h1 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    font-size: 1.75rem;
    margin: 0;
    color: #ffffff;
}

.important-topics-icon {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
}

.important-topics-intro {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-align: left;
}

.important-topics-grid {
    display: grid;
    gap: 1rem;
    max-width: 780px;
    margin: 0 auto;
}

.important-topics-grid + .important-topics-grid {
    margin-top: 1rem;
}

.important-topics-grid--extras {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.important-topics-grid--classes {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.important-topic-link {
    min-height: 102px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 0.4rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.important-topic-link:hover,
.important-topic-link:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: var(--primary-glow);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.important-topic-link img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
}

.important-topic-link img.important-topic-icon--compact {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

/* Contadores de World Boss e Server Save */
.event-countdowns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.countdown-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.countdown-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: linear-gradient(90deg, #765000 0%, #a97808 55%, #c99b2e 100%);
    color: #ffffff;
}

.countdown-card-header h2 {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0;
}

.countdown-card-body {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.35rem 1rem;
    text-align: center;
}

.countdown-card-icon {
    margin-bottom: 0.2rem;
    color: var(--primary);
    font-size: 2.25rem;
}

.countdown-card-image {
    display: block;
    width: 64px;
    height: 64px;
    margin-bottom: 0.2rem;
    object-fit: contain;
    image-rendering: pixelated;
}

.countdown-card-schedule {
    color: var(--text-primary);
}

.countdown-card-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.countdown-card-footer {
    padding: 0.75rem 1rem;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
    text-align: center;
}

.countdown-card-time {
    display: block;
    color: var(--primary-hover);
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

/* Índice e páginas individuais de vocações */
.vocation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.vocation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 245px;
    padding: 1.5rem 1.25rem;
    background: linear-gradient(145deg, var(--surface), var(--background-secondary));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.vocation-card:hover,
.vocation-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34), 0 0 16px var(--primary-glow);
}

.vocation-card img,
.vocation-hero-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
}

.vocation-card h2 {
    margin: 0.75rem 0 0.35rem;
    font-size: 1.2rem;
}

.vocation-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.vocation-page-header {
    margin-bottom: 2rem;
}

.vocation-page-header h1 {
    margin: 0.65rem 0 0.35rem;
    font-size: 2.5rem;
}

.vocation-page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.vocation-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 1.5rem;
    text-align: left;
}

.vocation-main,
.vocation-sidebar-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.vocation-main section + section,
.vocation-sidebar-card + .vocation-sidebar-card {
    margin-top: 1.5rem;
}

.vocation-main h2,
.vocation-sidebar-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--secondary);
}

.vocation-main p,
.vocation-main li,
.vocation-sidebar-card li,
.vocation-sidebar-card p {
    color: var(--text-secondary);
}

.vocation-main ul,
.vocation-sidebar-card ul {
    margin-left: 1.25rem;
}

.vocation-main li + li,
.vocation-sidebar-card li + li {
    margin-top: 0.4rem;
}

.vocation-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.vocation-stat {
    padding: 1rem 0.75rem;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.vocation-stat strong,
.vocation-stat span {
    display: block;
}

.vocation-stat strong {
    color: var(--primary);
    font-size: 1.25rem;
}

.vocation-stat span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.vocation-source {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

.vocation-source a {
    color: var(--secondary);
}

.vocation-source a:hover {
    text-decoration: underline;
}

.vocation-spells-section {
    margin-top: 2.5rem;
    text-align: left;
}

.vocation-spells-header {
    text-align: center;
}

.vocation-spells-header h2 {
    margin-bottom: 0.35rem;
    font-size: 1.65rem;
}

.vocation-spells-header p {
    color: var(--text-secondary);
}

.vocation-spells-table {
    min-width: 1050px;
    font-size: 0.88rem;
}

.vocation-spells-table th {
    cursor: default;
    white-space: nowrap;
}

.vocation-spells-table th:nth-child(2),
.vocation-spells-table td:nth-child(2),
.vocation-spells-table th:nth-child(5),
.vocation-spells-table td:nth-child(5),
.vocation-spells-table th:nth-child(8),
.vocation-spells-table td:nth-child(8) {
    text-align: left;
}

.vocation-spells-table th:first-child,
.vocation-spells-table td:first-child {
    width: 56px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.vocation-spell-icon img {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.vocation-spells-table code {
    color: var(--secondary-hover);
    white-space: nowrap;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Badges & Tags */
.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--surface-light);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.tag-primary {
    background: var(--primary-glow);
    color: var(--primary-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

.tag-secondary {
    background: var(--secondary-glow);
    color: var(--secondary-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

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

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    border-left: 4px solid transparent;
}

.alert-icon {
    font-size: 1.25rem;
    margin-top: 0.15rem;
}

.alert-icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.alert-content h4 {
    margin-bottom: 0.25rem;
}

.alert-info {
    background: var(--info-surface);
    border-color: var(--info);
    color: var(--info-text);
}
.alert-info h4 { color: var(--info-heading); }

.alert-tip {
    background: var(--tip-surface);
    border-color: var(--success);
    color: var(--tip-text);
}
.alert-tip h4 { color: var(--tip-heading); }

/* Keep every alert's text visually attached to its icon. */
.alert-content {
    text-align: left;
}

.alert-warning {
    background: var(--warning-surface);
    border-color: var(--warning);
    color: var(--warning-text);
}
.alert-warning h4 { color: var(--warning-heading); }

.alert-requirement {
    background: var(--requirement-surface);
    border-color: var(--danger);
    color: var(--requirement-text);
}
.alert-requirement h4 { color: var(--requirement-heading); }

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background: var(--surface);
}

th {
    background: var(--surface-light);
    color: var(--text-primary);
    padding: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

th.sort-asc::after { content: " ▴"; }
th.sort-desc::after { content: " ▾"; }

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.skull-bonus-table th:first-child,
.skull-bonus-table td:first-child {
    width: 90px;
    text-align: center;
}

.skull-bonus-table img {
    display: block;
    width: auto;
    max-width: 48px;
    height: auto;
    max-height: 48px;
    margin: 0 auto;
    image-rendering: pixelated;
}

.imbuement-scrolls-table {
    min-width: 620px;
}

.imbuement-scrolls-table th:first-child,
.imbuement-scrolls-table td:first-child {
    width: 90px;
}

.imbuement-scrolls-table th:nth-child(2),
.imbuement-scrolls-table td:nth-child(2),
.imbuement-scrolls-table th:nth-child(3),
.imbuement-scrolls-table td:nth-child(3) {
    text-align: left;
}

.imbuement-scrolls-table img {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Accordion */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1.5rem 0;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    cursor: pointer;
    text-align: left;
}

.accordion-header h3 {
    font-size: 1.05rem;
}

.accordion-icon {
    transition: var(--transition);
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    background: var(--background-secondary);
    transition: max-height 0.3s ease-out;
}

.accordion-content-inner {
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
}

/* Tabs */
.tabs {
    margin: 1.5rem 0;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-color: var(--primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Seletor por cards da página de Tasks */
.task-tab-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    border-bottom: none;
}

.tab-btn.task-tab-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.tab-btn.task-tab-card:hover,
.tab-btn.task-tab-card:focus-visible {
    border-color: var(--border-hover);
    background: var(--surface-light);
    transform: translateY(-2px);
}

.tab-btn.task-tab-card.active {
    border-color: var(--primary);
    background: var(--primary-glow);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.task-tab-title {
    color: var(--text-primary);
    font-size: 1.25rem;
}

.task-tab-description {
    max-width: 360px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
}

.task-tab-panel {
    animation: fadeIn 0.25s ease;
}

.task-summary-card {
    margin-bottom: 1.5rem;
}

.task-tab-panel .system-page-card ol {
    padding-left: 1.35rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.task-tab-panel .system-page-card ol li + li {
    margin-top: 0.5rem;
}

.task-difficulty-table th {
    cursor: default;
}

.talisman-upgrade-table {
    min-width: 820px;
}

.talisman-upgrade-table th {
    white-space: nowrap;
    cursor: default;
}

.talisman-upgrade-table th:first-child,
.talisman-upgrade-table td:first-child {
    min-width: 235px;
    text-align: left;
}

.weekly-task-table {
    min-width: 620px;
}

.weekly-task-table th {
    cursor: default;
}

.task-summary-note {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Menu Mobile Button Toggle */
.mobile-menu-toggle {
    display: none;
}

/* Skip Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Páginas individuais de sistemas */
.system-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.system-page-title {
    margin: 0;
    font-size: 2.5rem;
}

.system-page-intro {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.system-page-image {
    display: flex;
    justify-content: center;
    margin: 0 auto 2rem;
}

.system-page-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.chain-tier-image img,
.gold-border-image img {
    box-sizing: border-box;
    border: 4px solid var(--primary);
}

.system-page-media-small img {
    width: min(100%, 640px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.video-section {
    margin-top: 1.5rem;
}

.video-lite {
    position: relative;
    width: min(100%, 960px);
    aspect-ratio: 16 / 9;
    margin: 1rem auto 0;
    overflow: hidden;
    background: #000;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.video-lite-short {
    width: min(100%, 360px);
    aspect-ratio: 9 / 16;
    margin: 0 auto 2rem;
}

.video-lite-button {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000;
}

.video-lite-thumbnail,
.video-lite iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-lite-thumbnail {
    object-fit: cover;
}

.video-lite-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 72px;
    height: 52px;
    color: #fff;
    background: #f00;
    border-radius: 14px;
    place-items: center;
    transform: translate(-50%, -50%);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.video-lite-button:hover .video-lite-play,
.video-lite-button:focus-visible .video-lite-play {
    background: #c00;
    transform: translate(-50%, -50%) scale(1.08);
}

/* Mini tutoriais ilustrados */
.tutorial-section {
    margin: 2.5rem 0;
}

.tutorial-section > h2 {
    margin-bottom: 0.5rem;
}

.tutorial-section > p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.tutorial-method {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, var(--surface), var(--background-secondary));
}

.tutorial-method > h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tutorial-method > p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.tutorial-method-number,
.tutorial-step-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--background);
    font-family: var(--font-body);
    font-weight: 700;
}

.tutorial-method-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
}

.tutorial-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: stretch;
    gap: 1rem;
}

.tutorial-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-light);
    text-align: center;
}

.tutorial-step-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.8rem;
}

.tutorial-step img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    margin: auto;
}

.tutorial-step figcaption,
.tutorial-feature-image figcaption {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.tutorial-note {
    margin-bottom: 0;
}

.tutorial-feature-image {
    position: relative;
    margin: 0;
    text-align: center;
}

.tutorial-feature-image img {
    display: block;
    width: min(100%, 800px);
    height: auto;
    margin: 0 auto 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.tutorial-result-step {
    max-width: 240px;
    margin: 1rem auto 0;
}

.system-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: center;
    gap: 1.5rem;
    margin: 0 auto 2rem;
}

.system-image-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.system-image-figure img {
    display: block;
    max-width: 100%;
    height: auto;
}

.system-image-figure figcaption {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.system-page-card .system-page-image {
    margin: 1rem auto;
}

.fishing-box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.fishing-box {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--background-secondary);
    text-align: center;
    transition: var(--transition);
}

.fishing-box .header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--primary-hover);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
}

.fishing-box .content {
    padding: 1rem;
}

.fishing-box .label {
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.fishing-box .value {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.fishing-box .value:last-child {
    margin-bottom: 0;
}

.fishing-box:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px var(--primary-glow);
    transform: translateY(-2px);
}

.fishing-tables-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    align-items: start;
    gap: 1rem;
    margin-top: 1.5rem;
}

.fishing-table-column {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.fishing-table-column table {
    display: block;
    margin: 0;
}

.fishing-table-column thead,
.fishing-table-column thead tr {
    display: block;
}

.fishing-table-column thead th:first-child {
    display: none;
}

.fishing-table-column thead th:last-child {
    display: block;
    width: 100%;
    padding: 1rem;
    color: var(--secondary-hover);
    font-size: 1.15rem;
    text-align: center;
}

.fishing-table-column tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.fishing-table-column tbody tr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-light);
    text-align: center;
    transition: var(--transition);
}

.fishing-table-column tbody tr:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.fishing-table-column tbody td {
    max-width: 100%;
    padding: 0.5rem;
    border: 0;
    overflow-wrap: anywhere;
}

.fishing-table-column tbody td:first-child {
    padding-bottom: 0;
}

.fishing-table-column tbody img {
    display: block;
    width: auto;
    max-width: 64px;
    height: auto;
    max-height: 64px;
    margin: 0 auto;
    object-fit: contain;
}

.fishing-table-column tbody img[src=""] {
    display: none;
}

/* Drops das minas */
.mining-drops-section {
    margin: 2.5rem 0;
}

.mining-drops-section > h2 {
    margin-bottom: 1.5rem;
}

.mining-mines-list {
    display: grid;
    gap: 1.5rem;
}

.mining-mine-group {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.mining-mine-group > h3 {
    margin: 0;
    padding: 1rem;
    color: var(--secondary-hover);
    background: var(--surface-light);
    text-align: center;
}

.mining-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.mining-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-light);
    text-align: center;
    transition: var(--transition);
}

.mining-item-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.mining-item-card img {
    display: block;
    width: auto;
    max-width: 64px;
    height: auto;
    max-height: 64px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.mining-item-card span {
    max-width: 100%;
    color: var(--text-secondary);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.system-page-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.system-page-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.system-page-card h2 {
    margin-bottom: 0.75rem;
    color: var(--primary-hover);
    font-size: 1.15rem;
}

.system-page-card p,
.system-page-card ul {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.system-page-card ul {
    padding-left: 0;
    list-style-position: inside;
}

.system-page-card li + li {
    margin-top: 0.5rem;
}

/* Guias curtos da página Utilidades */
.utilities-grid .system-page-card,
.utilities-grid .system-page-card h2,
.utilities-grid .system-page-card p {
    text-align: left;
}

.utilities-grid .system-page-card ol {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    list-style-position: outside;
}

.utilities-grid .system-page-card li {
    padding-left: 0.25rem;
}

.utilities-grid .system-page-card li + li {
    margin-top: 0.5rem;
}

/* Listas numeradas: marcador destacado à esquerda em todos os cards */
.content-wrapper .system-page-card ol {
    counter-reset: wiki-step;
    margin: 0;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    list-style: none;
}

.content-wrapper .system-page-card ol > li {
    position: relative;
    min-height: 1.85rem;
    padding: 0.2rem 0 0.2rem 2.65rem;
    text-align: left;
    counter-increment: wiki-step;
}

.content-wrapper .system-page-card ol > li::before {
    content: counter(wiki-step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--primary) 72%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--primary-hover);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}
