* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #0a0f1e 0%, #0c1222 100%);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #f0f3fa;
    line-height: 1.5;
    padding: 2rem 1.5rem;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD966, #FFB347);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.1rem;
    color: #a6b3d0;
    margin-top: 0.5rem;
}

.player-section {
    background: #070b17;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.6);
    margin-bottom: 2rem;
    border: 1px solid #262e44;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

#videoFrame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.film-info {
    padding: 1.3rem 2rem;
    background: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(4px);
    border-top: 1px solid #2a314a;
}

.film-title {
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.film-title span:first-child {
    background: #ffb34720;
    color: #FFB347;
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
}

.source-badge {
    background: #2a334f;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.film-desc {
    color: #b9c3e0;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 1.5rem 0 1rem 0;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
}

.badge-count {
    background: #1e253e;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.4rem;
}

.movie-card {
    background: #111827;
    border-radius: 1.2rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #26304e;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #ffb34770;
    background: #151f32;
}

.thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail .video-preview {
    background: #0a0f1e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb347;
    font-size: 2rem;
    width: 100%;
    height: 100%;
}

.play-icon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.movie-card:hover .play-icon-overlay {
    opacity: 1;
}

.card-info {
    padding: 0.8rem 1rem 1rem;
}

.movie-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    font-size: 0.7rem;
    color: #9ba9ce;
    margin-top: 0.3rem;
    display: flex;
    gap: 8px;
    align-items: center;
}

.source-type {
    background: #2a2f48;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.delete-btn {
    background: #4a2f2f;
    color: #ff9e8f;
    font-size: 0.7rem;
    padding: 4px 8px;
    margin-top: 6px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.delete-btn:hover {
    background: #7a3f3f;
}

.upload-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #2a334f;
    padding-bottom: 8px;
}

.tab-btn {
    background: transparent;
    color: #b9c3e0;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn.active {
    background: #ffb34720;
    color: #FFB347;
    border: 1px solid #ffb34760;
}

.tab-pane {
    display: none;
}

.tab-pane.active-pane {
    display: block;
}

.add-movie-area {
    background: #0e1428;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #2a334f;
    margin-top: 2rem;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.input-field {
    flex: 2;
    min-width: 180px;
}

.input-field label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: #bfccf0;
}

.input-field input {
    width: 100%;
    background: #010511;
    border: 1px solid #2f3a60;
    padding: 10px 14px;
    border-radius: 40px;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.input-field input:focus {
    border-color: #ffb347;
}

.input-field input[type="file"] {
    padding: 8px;
    background: #010511;
}

button {
    background: #ffb347;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: bold;
    color: #0c0f1c;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #ffa01e;
    transform: scale(0.97);
}

.progress-bar {
    margin-top: 12px;
    background: #2a334f;
    border-radius: 20px;
    overflow: hidden;
    height: 6px;
}

.progress-fill {
    background: #ffb347;
    width: 0%;
    height: 100%;
    transition: width 0.3s;
}

.file-info, .note {
    font-size: 0.7rem;
    color: #7f8bb3;
    margin-top: 12px;
}

@media (max-width: 640px) {
    body { padding: 1rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .film-title { font-size: 1.2rem; }
}

/* Tambahkan ke style.css yang sudah ada */
.connection-status {
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.connection-status.success {
    background: #2e7d3230;
    border: 1px solid #4caf50;
    color: #4caf50;
}

.connection-status.error {
    background: #da190b30;
    border: 1px solid #f44336;
    color: #f44336;
}

.connection-status.warning {
    background: #ff980030;
    border: 1px solid #ff9800;
    color: #ff9800;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,179,71,.3);
    border-radius: 50%;
    border-top-color: #ffb347;
    animation: spin 1s ease-in-out infinite;
}

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

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #333;
    color: white;
    border-radius: 8px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}