/* zcore - component extensions (toast, skeleton, extras) */

/* ===== toast notifications ===== */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    pointer-events: all;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.toast-enter {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text);
}

.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-left: 3px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info { border-left: 3px solid var(--accent); }
.toast-info .toast-icon { color: var(--accent); }

/* ===== skeleton loaders ===== */
.skeleton-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 3px;
}

.skeleton-title {
    width: 40%;
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-text {
    width: 80%;
    margin-top: 6px;
}

.skeleton-text.short {
    width: 50%;
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-stat {
    height: 60px;
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

/* ===== auth page layout ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text);
}

.auth-logo p {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-top: 4px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-dim);
}

.auth-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-footer a:hover {
    color: var(--text);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
}

/* ===== game cards (store) ===== */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.game-card-banner {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.game-card-body {
    padding: 16px;
}

.game-card-title {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.game-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-card-price {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
}

/* ===== subscription plan cards ===== */
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.plan-card:hover {
    border-color: var(--border-focus);
}

.plan-card.recommended {
    border-color: var(--accent);
}

.plan-card.recommended::before {
    content: 'popular';
    position: absolute;
    top: -10px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--text);
    color: var(--bg);
    padding: 2px 10px;
    border-radius: 3px;
}

.plan-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.plan-price {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.plan-duration {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

/* ===== config editor ===== */
.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.config-item:last-child {
    border-bottom: none;
}

.config-item-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
}

.config-item-desc {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* range slider */
.range-slider {
    -webkit-appearance: none;
    width: 120px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--text);
    border-radius: 50%;
    cursor: pointer;
}

/* ===== status indicators ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid;
}

.status-badge-active {
    border-color: var(--success-muted);
    color: var(--success);
    background: rgba(34, 197, 94, 0.08);
}

.status-badge-expired {
    border-color: var(--danger-muted);
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
}

.status-badge-cancelled {
    border-color: var(--border);
    color: var(--text-dim);
}

.status-badge-online {
    border-color: var(--success-muted);
    color: var(--success);
    background: rgba(34, 197, 94, 0.08);
}

.status-badge-maintenance {
    border-color: var(--warning-muted);
    color: var(--warning);
    background: rgba(234, 179, 8, 0.08);
}

.status-badge-offline {
    border-color: var(--danger-muted);
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
}

/* ===== profile avatar ===== */
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== marketplace cards ===== */
.marketplace-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.15s;
}

.marketplace-card:hover {
    border-color: var(--border-focus);
}

.marketplace-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.marketplace-card-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* ===== empty state enhanced ===== */
.empty-state-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ===== responsive extras ===== */
@media (max-width: 640px) {
    .toast-container {
        top: auto;
        bottom: 56px;
        right: 8px;
        left: 8px;
    }

    .toast {
        max-width: 100%;
    }

    .auth-container {
        padding: 12px;
    }
}
