/* Furry Stream Radio - Global Styles */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Card component */
.card {
    background: #2d3748;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* Typography */
h1, h2, h3 {
    color: #e2e8f0;
    margin-bottom: 20px;
}

/* Button styles */
.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #2ecc71;
}

.btn-success:hover {
    background: #27ae60;
}

/* Disabled state */
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input styles */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a5568;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
    background: #1a202c;
    color: #e2e8f0;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

/* Focus states */
input:focus,
button:focus,
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Popup notification styles */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
}

.alert.removing {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

.alert-success {
    background: linear-gradient(135deg, #2d5f3f 0%, #1e4d2f 100%);
    color: #9ae6b4;
    border-left: 4px solid #38a169;
}

.alert-success::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #38a169;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.alert-error {
    background: linear-gradient(135deg, #5f2d2d 0%, #4d1e1e 100%);
    color: #fc8181;
    border-left: 4px solid #c53030;
}

.alert-error::before {
    content: '✕';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #c53030;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-active {
    background: #2d5f3f;
    color: #9ae6b4;
}

.status-active::before {
    content: '●';
    animation: pulse 2s infinite;
    margin-right: 5px;
}

.status-inactive {
    background: #5f2d2d;
    color: #fc8181;
}

/* Grid layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #4a5568;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bar */
progress {
    width: 100%;
    height: 30px;
    border-radius: 5px;
    overflow: hidden;
}

progress::-webkit-progress-bar {
    background-color: #1a202c;
    border-radius: 5px;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 5px;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

button, .btn {
    transition: all 0.2s ease;
}

/* Video list scrollbar */
.video-list::-webkit-scrollbar {
    width: 8px;
}

.video-list::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 4px;
}

.video-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.video-list::-webkit-scrollbar-thumb:hover {
    background: #7f9cf5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .controls button {
        width: 100%;
    }

    .playlist-form {
        flex-direction: column;
    }

    .playlist-form input,
    .playlist-form button {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .btn,
    .controls,
    .drop-zone,
    .playlist-form {
        display: none;
    }

    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    /* Uncomment when implementing dark mode
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .card {
        background: #2d3748;
        color: #e2e8f0;
    }

    input {
        background: #1a202c;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    */
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .status-badge {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
