/* Full-screen animated starfield canvas */
#starfield {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through */
}
/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000; /* Space black */
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1; /* Above starfield */
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    animation: fadeIn 1s ease-in;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #6a0dad, #8a2be2, #b19cd9, #7b2cbf, #9b5de5);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
    animation: slideInDown 0.8s ease-out, purpleGlow 3s ease-in-out infinite alternate, gradientShift 8s linear infinite;
    font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 800;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes purpleGlow {
    0% { text-shadow: 0 0 8px rgba(138, 43, 226, 0.4), 0 0 16px rgba(123, 44, 191, 0.2); }
    100% { text-shadow: 0 0 12px rgba(179, 157, 217, 0.6), 0 0 24px rgba(155, 93, 229, 0.35); }
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
    animation: slideInUp 0.8s ease-out;
}

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

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

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

/* Utility classes */
.hidden {
    display: none !important;
}

/* Glass morphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-in;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(138, 43, 226, 0.4);
}

.glass-card h2 {
    margin-bottom: 20px;
    color: #9370db;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-card h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #8a2be2;
    border-radius: 50%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.3);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
button {
    background: linear-gradient(90deg, #8a2be2, #6a0dad);
    color: white;
    border: none;
    padding: 12px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
}

button:active {
    transform: translateY(0);
}

/* Specific spacing for Add Streamer button */
#add-streamer-btn {
    margin-top: 10px;
}

#save-interval-btn {
    margin-top: 10px;
}

/* Config options */
.config-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.config-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-option input {
    width: auto;
}

.custom-api-form {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-api-form.active {
    display: block;
}

/* Settings section */
.settings-header {
    cursor: pointer;
    user-select: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.settings-header:hover {
    color: #9370db;
    transform: rotate(20deg);
}

.settings-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section {
    margin-bottom: 25px;
}

.settings-section h3 {
    color: #9370db;
    margin-bottom: 15px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #8a2be2;
    border-radius: 50%;
}

.settings-section:last-child {
    margin-bottom: 0;
}

/* Streamer cards */
#streamers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.streamer-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.streamer-card:hover {
    background: rgba(138, 43, 226, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
}

/* Delete streamer button */
.delete-streamer {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.delete-streamer:hover {
    background: rgba(255, 0, 0, 0.3);
    color: #ff0000;
    transform: scale(1.1);
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #8a2be2;
    transition: transform 0.3s ease;
}

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

.streamer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.streamer-info h3 {
    margin-bottom: 5px;
    color: #9370db;
    font-size: 1.2rem;
}

.game {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 5px;
    color: #d8bfd8;
}

.title {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #f0e6ff;
}

.viewers {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.status {
    font-weight: bold;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status.live::before {
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00;
}

.status.offline::before {
    background: #ff0000;
}

.status.live {
    color: #00ff00;
}

.status.offline {
    color: #ff6b6b;
}

/* Badge styles */
.badge {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    vertical-align: middle;
}

.badge-default {
    background: rgba(147, 112, 219, 0.2);
    color: #cdb5ff;
    border: 1px solid rgba(147, 112, 219, 0.4);
}

.badge-custom {
    background: rgba(0, 200, 120, 0.2);
    color: #6ff2c5;
    border: 1px solid rgba(0, 200, 120, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .config-options {
        flex-direction: column;
        gap: 10px;
    }
    
    #streamers-list {
        grid-template-columns: 1fr;
    }
    
    .streamer-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-image {
        margin: 0 auto;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select,
    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .glass-card {
        padding: 15px;
    }
    
    .streamer-card {
        padding: 10px;
    }
    
    .profile-image {
        width: 60px;
        height: 60px;
    }
}
