/* Custom variables for styling */
:root {
    --bg-color-1: #0f172a;
    --bg-color-2: #020617;
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(255, 255, 255, 0.15);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent: #a855f7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
}

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

body {
    background: radial-gradient(circle at 50% 50%, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* Decorative Background Glows */
.app-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.25;
}

.sphere-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 5%;
    left: -100px;
}

.sphere-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: 10%;
    right: -150px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

.brand-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 500;
}

/* Layout Grid */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .app-grid {
        grid-template-columns: 400px 1fr;
    }
}

/* Generic Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--card-hover-border);
}

.card-header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Que Wescley Sou Eu Card */
.card.hovercard {
    position: relative;
    padding: 0;
    overflow: hidden;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.card.hovercard .card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.card.hovercard .card-background img {
    width: 105%;
    height: 105%;
    object-fit: cover;
    filter: blur(12px) brightness(0.4);
    transform: scale(1.05);
}

.card.hovercard .useravatar {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.hovercard:hover .useravatar {
    transform: translateX(-50%) scale(1.05) rotate(3deg);
}

.card.hovercard .useravatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.1);
    object-fit: cover;
}

.card.hovercard .card-info {
    position: absolute;
    bottom: 24px;
    z-index: 1;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.card.hovercard .card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    letter-spacing: 0.05em;
}

/* Vexame Status Card */
.status-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.status-card.status-vexame::before {
    background: linear-gradient(90deg, var(--danger), #f97316);
}

.status-card.status-safe::before {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.status-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.status-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.status-card.status-vexame .status-icon-wrapper {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    box-shadow: 0 0 20px var(--danger-glow);
}

.status-card.status-safe .status-icon-wrapper {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

/* Hide / show icons in the status depending on state */
.status-card.status-vexame .success-icon { display: none; }
.status-card.status-safe .danger-icon { display: none; }

.status-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.status-card.status-vexame h2 {
    color: #fca5a5;
}

.status-card.status-safe h2 {
    color: #a7f3d0;
}

/* Phrase Card (Quote) */
.phrase-card {
    position: relative;
    padding: 30px 24px;
}

.quote-container {
    position: relative;
    text-align: center;
    width: 100%;
}

.quote-text {
    font-family: 'Pinyon Script', cursive;
    font-size: 2.5rem;
    line-height: 1.2;
    color: #e2e8f0;
    margin-bottom: 24px;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.quote-container h3.pull-right {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    float: none;
    text-align: right;
    display: block;
    margin-top: -10px;
}

.quote-container h3.pull-right::before {
    content: "— ";
}

/* Year Archives Card */
.archives-card {
    padding-bottom: 20px;
}

.archives-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.archives-list a {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.archives-list a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Stats Selector Card & Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    outline: none;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    color: #fff;
}

.stat-card.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
    color: #fff;
}

.stat-card-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.stat-card.active .stat-card-icon-wrapper {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.stat-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Colored Icon Styles for Visual Richness */
.val-canetas { color: #f43f5e; }
.val-chapeus { color: #fbbf24; }
.val-golscontra { color: #f97316; }
.val-entregadas { color: #38bdf8; }
.val-perdidos { color: #a855f7; }
.val-golspro { color: #10b981; }

.stat-card.active .stat-card-icon-wrapper.val-canetas { background: #f43f5e; color: #fff; box-shadow: 0 4px 12px rgba(244,63,94,0.4); }
.stat-card.active .stat-card-icon-wrapper.val-chapeus { background: #fbbf24; color: #fff; box-shadow: 0 4px 12px rgba(251,191,36,0.4); }
.stat-card.active .stat-card-icon-wrapper.val-golscontra { background: #f97316; color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,0.4); }
.stat-card.active .stat-card-icon-wrapper.val-entregadas { background: #38bdf8; color: #fff; box-shadow: 0 4px 12px rgba(56,189,248,0.4); }
.stat-card.active .stat-card-icon-wrapper.val-perdidos { background: #a855f7; color: #fff; box-shadow: 0 4px 12px rgba(168,85,247,0.4); }
.stat-card.active .stat-card-icon-wrapper.val-golspro { background: #10b981; color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.4); }

/* Stats Display Detail Panel */
.stats-display-card {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 50%), var(--card-bg);
}

.tab-content {
    width: 100%;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.tab-pane.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.stat-hero-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat-hero-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-hero-value {
    font-family: 'TPF2', 'Outfit', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
    margin: 10px 0;
}

/* Replaced element classes */
.stat-hero-value .glyphicon-arrow-up {
    font-size: 1.8rem;
    font-family: sans-serif;
    display: inline-flex;
    align-items: center;
    color: var(--success);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 6px 12px;
    border-radius: 12px;
    gap: 4px;
}

.stat-hero-value .glyphicon-arrow-up::before {
    content: "▲";
    font-size: 1.2rem;
}

.stat-hero-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 16px;
    border-radius: 20px;
}

/* Media / Video Card */
.video-card {
    padding: 24px;
}

.youtube-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* App Footer */
.app-footer {
    text-align: center;
    padding: 40px 0 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

/* Animation utilities */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.1), 0 0 15px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.15), 0 0 25px rgba(99, 102, 241, 0.55);
    }
}

.card.hovercard .useravatar img {
    animation: pulseGlow 4s infinite ease-in-out;
}

/* Support for custom @font-face loaded from relative paths */
@font-face {
    font-family: 'TPF2';
    src: url('../bootstrap/fonts/display.ttf') format('truetype'), url('../bootstrap/fonts/symbol.ttf') format('truetype');
}
