/* Enhanced styling and personality for Yumis Forge */
/* This file extends the base style.css with improved visual design */

:root {
    /* Enhanced color palette */
    --primary-dark: #0a0d1a;
    --primary-light: #1a1f32;
    --accent-glow: rgba(63, 116, 219, 0.25);
    --gold-glow: rgba(207, 178, 117, 0.2);
    --danger-glow: rgba(239, 68, 68, 0.2);
    --success-glow: rgba(34, 197, 94, 0.2);
    
    /* Enhanced shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(63, 116, 219, 0.15);
}

/* ============= Typography Enhancements ============= */
h1 {
    background: linear-gradient(135deg, var(--cinder) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h2 {
    background: linear-gradient(135deg, var(--cinder) 0%, var(--mist) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
    font-weight: 600;
}

h3 {
    color: var(--cinder);
    font-size: 1.3rem;
}

/* ============= Card & Panel Enhancements ============= */
.card,
.fantasy-panel {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.95) 0%, rgba(9, 12, 19, 0.95) 100%);
    border: 1px solid rgba(126, 139, 170, 0.35);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    /* overflow: hidden removido para não cortar submenus posicionados absolutamente */
}

.card::before,
.fantasy-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(63, 116, 219, 0.1) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover,
.fantasy-panel:not(.topbar):hover {
    border-color: rgba(63, 116, 219, 0.5);
    box-shadow: var(--shadow-lg), 0 0 40px var(--accent-glow);
    transform: translateY(-4px);
}

.card:hover::before,
.fantasy-panel:hover::before {
    opacity: 1;
}

/* ============= Button Enhancements ============= */
.btn,
.button,
.button-outline {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before,
.button::before,
.button-outline::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
}

.btn:hover::before,
.button:hover::before,
.button-outline:hover::before {
    opacity: 1;
    transform: scale(1);
}

.btn-primary {
    background: linear-gradient(135deg, #3f74db 0%, #2c4f96 100%);
    box-shadow: 0 0 20px rgba(63, 116, 219, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(63, 116, 219, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(126, 139, 170, 0.2) 0%, rgba(63, 116, 219, 0.1) 100%);
    border: 1px solid rgba(126, 139, 170, 0.3);
}

.btn-secondary:hover {
    border-color: rgba(126, 139, 170, 0.6);
    background: linear-gradient(135deg, rgba(126, 139, 170, 0.3) 0%, rgba(63, 116, 219, 0.15) 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

/* ============= Form Elements ============= */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(126, 139, 170, 0.25);
    color: var(--cinder);
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(15, 20, 35, 0.95);
}

/* ============= Alert Messages ============= */
.alert,
.flash {
    border-radius: 12px;
    padding: 14px 16px;
    border-left: 4px solid;
    background-size: 400% 400%;
}

.alert-success,
.flash-success {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.alert-error,
.flash-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.alert-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

/* ============= Page Layout ============= */
.page-container {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 2rem 0;
}

.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(126, 139, 170, 0.2);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--mist);
    font-size: 1rem;
    margin: 0;
}

/* ============= Grid Cards ============= */
.card {
    padding: 1.5rem;
    border-radius: 12px;
}

.card h2 {
    margin-top: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(126, 139, 170, 0.15);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ============= Table Styling ============= */
table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

thead {
    background: rgba(63, 116, 219, 0.08);
    border-bottom: 2px solid rgba(63, 116, 219, 0.2);
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(126, 139, 170, 0.15);
}

th {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

tbody tr:hover {
    background: rgba(63, 116, 219, 0.05);
    border-bottom-color: rgba(63, 116, 219, 0.3);
}

.vip-badge {
    border: 1px solid rgba(216, 178, 110, 0.45);
    background: rgba(216, 178, 110, 0.18);
    color: #f7e3b4;
    font-size: 0.68rem;
    border-radius: 999px;
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Topbar user name ──────────────────────────────────── */
.topbar-user-info {
    text-align: left;
}

.topbar-username {
    display: block;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============= Empty State ============= */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--mist);
}

.empty-state p {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

/* ============= Badge & Labels ============= */
.badge,
.label {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(63, 116, 219, 0.15);
    color: var(--accent);
    border: 1px solid rgba(63, 116, 219, 0.3);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ffd4d4;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============= Navigation ============= */
.nav-item {
    transition: all 0.2s ease;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* ============= Reveal Animations ============= */
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple elements */
.reveal-up:nth-child(1) { animation-delay: 0.1s; }
.reveal-up:nth-child(2) { animation-delay: 0.2s; }
.reveal-up:nth-child(3) { animation-delay: 0.3s; }
.reveal-up:nth-child(4) { animation-delay: 0.4s; }
.reveal-up:nth-child(5) { animation-delay: 0.5s; }

/* ============= Gradient Accents ============= */
.gradient-text {
    background: linear-gradient(135deg, var(--cinder) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
    background-image: linear-gradient(rgba(15, 20, 35, 0.95), rgba(15, 20, 35, 0.95)),
                      linear-gradient(135deg, var(--accent), var(--gold));
    background-origin: padding-box, border-box;
}

/* ============= Modal Styling ============= */
.modal {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.98) 0%, rgba(9, 12, 19, 0.98) 100%);
    border: 1px solid rgba(126, 139, 170, 0.35);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
}

/* ============= Responsive Design ============= */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .page-container {
        padding: 1.5rem 0;
        width: calc(100% - 16px);
    }

    .card {
        padding: 1rem;
        border-radius: 10px;
    }
}

/* ============= Scrollbar Styling ============= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(126, 139, 170, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--gold));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent), var(--gold));
    opacity: 1;
}

/* ============= Link Styling ============= */
a:not(.btn):not(.button):not(.button-outline) {
    color: var(--accent);
    transition: color 0.2s ease;
    position: relative;
}

a:not(.btn):not(.button):not(.button-outline):hover {
    color: var(--gold);
}

/* ============= Utility Classes ============= */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* ============= Shadow Effects ============= */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.shadow-glow { box-shadow: var(--shadow-glow); }

/* ============================================================
   Extended Animations & Visual FX
   ============================================================ */

/* ── Floating cards ───────────────────────────────────────── */
.content-card,
.stat-card,
.metric-card,
.feed-card,
.plan-card,
.grid-card {
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow 0.32s ease;
}

.content-card:hover,
.stat-card:hover,
.plan-card:hover,
.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55),
                0 0 32px rgba(63, 116, 219, 0.12);
}

.metric-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: floatCard 5s ease-in-out infinite;
}

.metric-card:nth-child(2) { animation-delay: 0.6s; }
.metric-card:nth-child(3) { animation-delay: 1.2s; }
.metric-card:nth-child(4) { animation-delay: 1.8s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

/* ── Gold shimmer on headings ─────────────────────────────── */
h1 {
    background-size: 200% auto;
    animation: shimmerText 4s linear infinite;
}

@keyframes shimmerText {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ── Glow pulse on primary buttons ───────────────────────── */
.button,
.btn-post {
    position: relative;
    overflow: hidden;
}

.button::after,
.btn-post::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: none;
}

.button:hover::after,
.btn-post:hover::after {
    animation: sweepShine 0.55s ease forwards;
}

@keyframes sweepShine {
    to { transform: translateX(100%); }
}

/* ── Topbar glow border on scroll ────────────────────────── */
.topbar {
    transition: box-shadow 0.4s ease;
}

.topbar.scrolled {
    box-shadow: 0 4px 32px rgba(63, 116, 219, 0.22),
                0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ── Card inner gold border on hover ─────────────────────── */
.content-card::before,
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(216, 178, 110, 0.0),
        rgba(216, 178, 110, 0.45),
        rgba(63, 116, 219, 0.35),
        rgba(216, 178, 110, 0.0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
                  linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.content-card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

/* ── Arcane typewriter for eyebrow text ──────────────────── */
.eyebrow {
    font-size: 0.73rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--arcane-gold, var(--gold));
    position: relative;
    display: inline-block;
}

.eyebrow::after {
    content: '';
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--arcane-gold, var(--gold));
    animation: blinkDot 1.2s step-end infinite;
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Action-btn hover lift ────────────────────────────────── */
.action-btn,
.button-outline {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    border-color: rgba(216, 178, 110, 0.5);
}

/* ── Reaction button pop ─────────────────────────────────── */
.reaction-btn {
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.2s ease,
                background 0.2s ease;
}

.reaction-btn:hover {
    transform: scale(1.25);
}

.reaction-btn.active {
    animation: reactionPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reactionPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ── Flash message slide-in ───────────────────────────────── */
.flash {
    animation: slideDown 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Submenu panel slide-in ───────────────────────────────── */
.menu-group.is-open .submenu-panel {
    animation: menuSlide 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes menuSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Notification unread pulse ────────────────────────────── */
.notification-item.unread {
    animation: unreadPulse 3s ease-in-out infinite;
}

@keyframes unreadPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(216, 178, 110, 0.0); }
    50%       { box-shadow: 0 0 12px 3px rgba(216, 178, 110, 0.2); }
}

/* ── Scroll-triggered topbar ──────────────────────────────── */
