/* ================================
   Reusable Components
   YULGANG KING Portal
================================ */

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-gold);
    color: #000;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color-light);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-gold);
}

.btn-outline {
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
    background: var(--accent-gold);
    color: #000;
}

.btn-danger {
    background: var(--gradient-red);
    color: #fff;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-base);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--fs-xs);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 215, 0, 0.03);
}

.card-title {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-title i {
    font-size: var(--fs-lg);
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

/* ===== Section Headers ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gold {
    background: rgba(255, 215, 0, 0.15);
    color: var(--accent-gold);
}

.badge-red {
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent-red);
}

.badge-green {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-green);
}

.badge-blue {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

/* ===== Avatar ===== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

/* ===== Input Fields ===== */
.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.input-field {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--fs-base);
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

/* ===== Links ===== */
.link {
    color: var(--accent-gold);
    transition: color var(--transition-fast);
}

.link:hover {
    color: var(--accent-gold-light);
    text-decoration: underline;
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--space-lg) 0;
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Pulse Animation ===== */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== Glow Effect ===== */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    }

    to {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }
}

/* ===== Text Utilities ===== */
.text-gold {
    color: var(--accent-gold);
}

.text-red {
    color: var(--accent-red);
}

.text-green {
    color: var(--accent-green);
}

.text-blue {
    color: var(--accent-blue);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* ===== Flex Utilities ===== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

/* ===== Visibility ===== */
.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}