/* ===== COMMON STYLES - STREAMING FINAL CENTRAL SERVER ===== */

/* === LAYOUT UTILITIES === */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

/* === RESPONSIVE GRID LAYOUTS === */
.grid-responsive {
    display: grid;
    gap: 20px;
    padding: 20px;
}

.grid-xl {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid-lg {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.grid-md {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.grid-xs {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.grid-xxs {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

/* === RESPONSIVE BREAKPOINTS === */
@media (max-width: 1400px) {
    .grid-responsive.grid-xl {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 1200px) {
    .grid-responsive.grid-xl {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .grid-responsive.grid-lg {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 992px) {
    .grid-responsive.grid-xl {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .grid-responsive.grid-lg {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid-responsive {
        padding: 15px;
        gap: 15px;
    }
    .grid-responsive.grid-xl,
    .grid-responsive.grid-lg {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 576px) {
    .grid-responsive {
        padding: 10px;
        gap: 10px;
    }
    .grid-responsive.grid-xl,
    .grid-responsive.grid-lg {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .grid-responsive.grid-xl,
    .grid-responsive.grid-lg {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* === COMMON BUTTON STYLES === */
.btn-primary {
    background: linear-gradient(135deg, #e50914, #b20710);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f40612, #d40813);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* === LOADING STATES === */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #e50914;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === FOCUS MANAGEMENT === */
.focused {
    outline: 2px solid #e50914;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.3);
}

.selected {
    background: rgba(229, 9, 20, 0.2);
    border: 2px solid #e50914;
}

/* === COMMON ANIMATIONS === */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* === UTILITY CLASSES === */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

.pointer-events-none {
    pointer-events: none;
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-hidden {
    overflow: hidden;
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === COMMON CARD STYLES === */
.card {
    background: rgba(20, 20, 20, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* === COMMON MODAL STYLES === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #141414;
    border-radius: 8px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === COMMON FORM STYLES === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    border-color: #e50914;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3);
}

/* === COMMON NAVIGATION STYLES === */
.nav-button {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: rgba(229, 9, 20, 0.8);
    border-color: #e50914;
    transform: scale(1.1);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.nav-button:disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}