/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--trans-normal);
    gap: var(--space-sm);
    font-size: 1rem;
    min-height: 48px; /* Mobile touch target standard */
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(345, 80%, 45%), hsl(345, 80%, 30%));
    color: white;
    box-shadow: 0 4px 15px hsla(var(--clr-primary), 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsla(var(--clr-primary), 0.5);
    background: linear-gradient(135deg, hsl(345, 75%, 55%), hsl(345, 80%, 40%));
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: hsl(var(--clr-text-main));
    box-shadow: var(--shadow-soft);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

/* Cards / Glass Morphism */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

/* Optional: a subtle shine effect on cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Forms & Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.input-label {
    font-size: 0.875rem;
    color: hsl(var(--clr-text-muted));
    font-weight: 500;
}

/* Inputs */
.input-field {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    color: hsl(var(--clr-text-main));
    font-family: var(--font-body);
    font-size: 1rem;
    min-height: 48px; /* Mobile touch target */
    transition: all var(--trans-normal);
}

.input-field:focus {
    outline: none;
    border-color: hsl(var(--clr-accent));
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 1px hsl(var(--clr-accent));
}

.input-field::placeholder {
    color: hsla(var(--clr-text-muted), 0.5);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1000px; /* Narrower for a more intimate layout */
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Gradients */
.text-gradient {
    background: linear-gradient(135deg, hsl(42, 100%, 75%), hsl(var(--clr-accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-ruby {
    background: linear-gradient(135deg, hsl(345, 80%, 65%), hsl(345, 80%, 45%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ambient Glow Backgrounds */
.ambient-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent glows from causing horizontal scrolling */
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.ambient-glow-primary {
    background: hsl(var(--clr-primary));
    width: 60vw;
    height: 60vh;
    top: -10vh;
    right: -10vw;
}

.ambient-glow-accent {
    background: hsl(var(--clr-accent));
    width: 50vw;
    height: 50vh;
    bottom: -10vh;
    left: -10vw;
    opacity: 0.1;
}

/* Mobile responsive utilities for components */
@media (max-width: 768px) {
    .card {
        padding: var(--space-lg); /* Reduce card padding on mobile */
    }
    
    .flex-between {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    /* Make glow orbs taller on mobile to cover the portrait viewport better */
    .ambient-glow-primary {
        width: 120vw;
        height: 60vh;
        top: -15vh;
        right: -30vw;
    }
    
    .ambient-glow-accent {
        width: 120vw;
        height: 60vh;
        bottom: -15vh;
        left: -30vw;
    }
}

/* ── Skeleton Loading ─────────────────────────────── */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.15; }
}

.skeleton {
    background: var(--glass-border);
    border-radius: var(--radius-md);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text-lg {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-circle {
    border-radius: 50%;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-2xl);
    color: hsl(var(--clr-text-muted));
    font-size: 0.95rem;
}

.loading-spinner::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: hsl(var(--clr-accent));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
