.movie-meta-box {
    padding: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.meta-tabs {
    margin-bottom: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #ccd0d4;
    background: #f9f9f9;
    border-radius: 4px 4px 0 0;
}

.tab-link {
    padding: 12px 20px;
    background: #f9f9f9;
    border: none;
    border-right: 1px solid #ccd0d4;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #646970;
    transition: all 0.2s ease;
}

.tab-link:last-child {
    border-right: none;
}

.tab-link:hover {
    background: #f0f0f0;
    color: #2271b1;
}

.tab-link.active {
    background: #fff;
    color: #2271b1;
    border-bottom: 3px solid #2271b1;
    margin-bottom: -1px;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.form-group .description {
    font-size: 12px;
    color: #646970;
    font-style: italic;
    margin-top: 4px;
}

.size-options {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    border: 1px solid #dcdcde;
}

.size-options h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 16px;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 10px;
}

.cast-crew-section {
    border-top: 1px solid #dcdcde;
    padding-top: 25px;
    margin-top: 25px;
}

.cast-crew-section h3 {
    margin: 0 0 20px 0;
    color: #1d2327;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

.select2-container {
    width: 100% !important;
}

.select2-selection {
    border: 1px solid #8c8f94 !important;
    border-radius: 4px !important;
    min-height: 36px !important;
}

.select2-selection:focus {
    border-color: #2271b1 !important;
    box-shadow: 0 0 0 1px #2271b1 !important;
    outline: none !important;
}

.movie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #1d2327;
    font-size: 20px;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.modal-content textarea {
    height: 100px;
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.button {
    padding: 8px 16px;
    border: 1px solid #2271b1;
    background: #2271b1;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.button:hover {
    background: #135e96;
    border-color: #135e96;
}

.button-primary {
    background: #2271b1;
    border-color: #2271b1;
}

.button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.cancel-modal {
    background: #d63638;
    border-color: #d63638;
}

.cancel-modal:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

.add-new-director,
.add-new-star {
    margin-top: 8px;
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #2c3338;
}

.add-new-director:hover,
.add-new-star:hover {
    background: #dcdcde;
    border-color: #787c82;
}

.movie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00a32a;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 100000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-link {
        border-right: none;
        border-bottom: 1px solid #ccd0d4;
    }
    
    .tab-link.active {
        border-bottom: 3px solid #2271b1;
        border-right: none;
        margin-bottom: 0;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}