/* components.css - Reusable UI components */

/* 
 * GLASS MORPHISM COMPONENTS
 */
 .glass {
    background-color: var(--glass-background);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-base);
}

.glass-solid {
    background-color: var(--glass-background-solid);
}

.glass:hover {
    background-color: var(--glass-background-solid);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Glass container variations */
.glass-container {
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
}

.glass-container-sm {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
}

.glass-container-lg {
    padding: var(--space-3xl);
    border-radius: var(--radius-2xl);
}

/* 
 * BUTTONS
 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: var(--font-semibold);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Primary button */
.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Secondary button */
.btn-secondary {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: var(--glass-background-solid);
    transform: translateY(-1px);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Button group */
.btn-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* 
 * CARDS
 */
.card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-2xl);
    padding: var(--space-lg);
    height: 100%;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
}

/* Card image */
.card-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: calc(var(--space-lg) * -1);
    margin-bottom: var(--space-lg);
}

.card-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* Card content */
.card-content {
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: var(--font-bold);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-style: italic;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* Card footer */
.card-footer {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

/* 
 * NAVIGATION
 */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    padding: var(--space-md) var(--content-padding);
}

.dynamic-island {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin-inline: auto;
    padding: 0 var(--space-lg);
    height: 56px;
    border-radius: 28px;
}

/* Logo */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar-brand img {
    width: 32px;
    height: 32px;
    display: block;
}

/* Navigation links */
.nav-links {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    font-weight: var(--font-semibold);
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.nav-links a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

/* Active indicator */
.nav-links a[data-active="true"] {
    color: var(--text-primary);
}

.nav-links a[data-active="true"]::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-primary);
    border-radius: 1px;
}

/* UI Controls */
.ui-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    font-weight: var(--font-medium);
    color: var(--text-secondary);
}

.ui-controls .separator {
    color: var(--glass-border);
}

#current-time {
    min-width: 85px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 
 * THEME SWITCHER
 */
#theme-switcher {
    position: relative;
}

#theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

#theme-toggle-btn:hover {
    background-color: var(--glass-background);
}

#theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: all var(--transition-base);
}

#theme-toggle-btn:hover svg {
    fill: var(--text-primary);
    transform: rotate(180deg);
}

/* Theme menu */
#theme-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    padding: var(--space-sm);
    border-radius: var(--radius-xl);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

#theme-menu.active {
    display: flex;
    gap: var(--space-sm);
    opacity: 1;
    transform: translateY(0);
}

.theme-option {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    position: relative;
}

.theme-option:hover {
    transform: scale(1.15);
    border-color: var(--text-primary);
}

.theme-option.active {
    border-color: var(--accent-primary);
}

/* Theme option colors */
[data-theme-name="sunrise"] { 
    background: linear-gradient(135deg, #fde68a 0%, #f472b6 100%); 
}
[data-theme-name="day"] { 
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 100%); 
}
[data-theme-name="sunset"] { 
    background: linear-gradient(135deg, #fbbf24 0%, #7c3aed 100%); 
}
[data-theme-name="night"] { 
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%); 
}

/* 
 * VIDEO CONTAINER
 */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

/* 
 * BADGES
 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    background-color: var(--glass-background);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.badge-primary {
    background-color: var(--accent-primary);
    color: var(--button-primary-bg);
    border-color: transparent;
}

.badge-success {
    background-color: var(--success);
    color: var(--button-primary-bg);
    border-color: transparent;
}

.badge-warning {
    background-color: var(--warning);
    color: var(--button-primary-bg);
    border-color: transparent;
}

.badge-error {
    background-color: var(--error);
    color: var(--button-primary-bg);
    border-color: transparent;
}

/* 
 * LOADING SPINNER
 */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 
 * TOOLTIPS
 */
.tooltip {
    position: relative;
}

.tooltip-content {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background-color: var(--glass-background-solid);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    z-index: var(--z-tooltip);
}

.tooltip:hover .tooltip-content {
    opacity: 1;
}

/* Arrow */
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--glass-background-solid);
}

/* 
 * DIVIDERS
 */
.divider {
    height: 1px;
    background-color: var(--glass-border);
    margin: var(--space-xl) 0;
}

.divider-thick {
    height: 2px;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    margin: 0 var(--space-md);
}

/* 
 * MOBILE MENU BUTTON
 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    color: var(--text-secondary);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Mobile menu styles would go here */
}