/**
 * Pick One - Base App Styles
 */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--po-font);
    background: var(--po-bg);
    color: var(--po-text);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* App Container */
.po-app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: var(--po-max-width);
    margin: 0 auto;
}

/* Header */
.po-header {
    position: sticky;
    top: 0;
    z-index: var(--po-z-header);
    background: var(--po-bg);
    padding-top: var(--po-safe-top);
}

.po-header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--po-header-height);
    padding: 0 var(--po-space-md);
}

.po-header__title {
    font-size: var(--po-font-size-xl);
    font-weight: 800;
    background: linear-gradient(135deg, #FF4757, #3742FA, #2ED573, #FFA502);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.po-header__actions {
    display: flex;
    gap: var(--po-space-sm);
}

.po-header__btn {
    width: 40px;
    height: 40px;
    border-radius: var(--po-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--po-text-secondary);
    transition: var(--po-transition-fast);
}

.po-header__btn:hover {
    background: var(--po-surface);
    color: var(--po-text);
}

/* Streak Banner */
.po-streak-banner {
    display: flex;
    align-items: center;
    gap: var(--po-space-sm);
    padding: var(--po-space-sm) var(--po-space-md);
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.15), rgba(255, 71, 87, 0.15));
    border-bottom: 1px solid rgba(255, 71, 87, 0.3);
}

.po-streak-banner[hidden] {
    display: none;
}

.po-streak-icon {
    font-size: 18px;
}

.po-streak-text {
    font-size: var(--po-font-size-sm);
    color: var(--po-comparacion-2);
    font-weight: 500;
}

/* Main Content */
.po-main {
    flex: 1;
    padding-bottom: calc(var(--po-nav-height) + var(--po-safe-bottom));
}

/* Bottom Navigation */
.po-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--po-max-width);
    display: flex;
    background: var(--po-surface);
    border-top: 1px solid var(--po-border);
    padding-bottom: var(--po-safe-bottom);
    z-index: var(--po-z-nav);
}

.po-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: var(--po-nav-height);
    color: var(--po-text-muted);
    font-size: var(--po-font-size-xs);
    transition: var(--po-transition-fast);
}

.po-nav-item.is-active {
    color: var(--po-text);
}

.po-nav-item svg {
    width: 24px;
    height: 24px;
}

/* Buttons */
.po-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--po-space-sm);
    padding: var(--po-space-md) var(--po-space-lg);
    border-radius: var(--po-radius-md);
    font-size: var(--po-font-size-md);
    font-weight: 600;
    transition: var(--po-transition-fast);
}

.po-btn--primary {
    background: var(--po-text);
    color: var(--po-bg);
}

.po-btn--primary:hover {
    opacity: 0.9;
}

.po-btn--ghost {
    background: transparent;
    color: var(--po-text-secondary);
    border: 1px solid var(--po-border);
}

.po-btn--ghost:hover {
    background: var(--po-surface);
    color: var(--po-text);
}

.po-btn--full {
    width: 100%;
}

/* Spinner */
.po-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--po-border);
    border-top-color: var(--po-text);
    border-radius: 50%;
    animation: po-spin 0.8s linear infinite;
}

@keyframes po-spin {
    to { transform: rotate(360deg); }
}

/* Skeleton */
.po-skeleton {
    background: linear-gradient(90deg, var(--po-surface) 0%, var(--po-surface-hover) 50%, var(--po-surface) 100%);
    background-size: 200% 100%;
    animation: po-shimmer 1.5s infinite;
    border-radius: var(--po-radius-md);
}

.po-skeleton--card {
    height: 350px;
    margin: var(--po-space-md);
}

@keyframes po-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast */
.po-toast {
    position: fixed;
    top: calc(var(--po-header-height) + var(--po-safe-top) + var(--po-space-md));
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    display: flex;
    align-items: center;
    gap: var(--po-space-md);
    background: var(--po-surface);
    border: 1px solid var(--po-border);
    border-radius: var(--po-radius-lg);
    padding: var(--po-space-md);
    box-shadow: var(--po-shadow-lg);
    z-index: var(--po-z-toast);
    opacity: 0;
    transition: var(--po-transition);
    min-width: 280px;
    max-width: calc(100vw - var(--po-space-xl));
}

.po-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.po-toast[hidden] {
    display: none;
}

.po-toast__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--po-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.po-toast__title {
    font-weight: 600;
    font-size: var(--po-font-size-md);
}

.po-toast__subtitle {
    font-size: var(--po-font-size-sm);
    color: var(--po-text-secondary);
}

/* XP Popup */
.po-xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: var(--po-tier-oro);
    color: #000;
    padding: var(--po-space-md) var(--po-space-lg);
    border-radius: var(--po-radius-full);
    font-weight: 800;
    font-size: var(--po-font-size-xl);
    z-index: var(--po-z-popup);
    opacity: 0;
    pointer-events: none;
    transition: var(--po-transition);
}

.po-xp-popup.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.po-xp-popup[hidden] {
    display: none;
}

/* Section */
.po-section {
    padding: var(--po-space-lg) var(--po-space-md);
}

.po-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--po-space-md);
}

.po-section__title {
    font-size: var(--po-font-size-lg);
    font-weight: 700;
}

.po-section__count {
    font-size: var(--po-font-size-sm);
    color: var(--po-text-muted);
}
