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

body {
    font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: #f5f5f5;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.auth-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}
.auth-bar #auth-user-label {
    color: #333;
    margin-right: auto;
}
.auth-bar a {
    color: #1e88e5;
    text-decoration: none;
    font-weight: 600;
}
.auth-bar-logout {
    background: transparent;
    border: 1px solid #999;
    color: #333;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.auth-bar-logout:hover {
    background: #e0e0e0;
}

.title {
    font-size: 32px;
    font-weight: 900;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 40px;
}

.upload-section {
    margin-bottom: 24px;
    text-align: center;
}

.upload-label {
    display: block;
    text-align: center;
    color: #1e88e5;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: rgba(30, 136, 229, 0.1);
}

.preview-container {
    position: relative;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #e0e0e0;
    padding: 16px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.remove-btn {
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #e0e0e0;
    border-radius: 12px;
}

.checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #1e88e5;
}

.checkbox-container label {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.text-input-section {
    margin-bottom: 24px;
}

.text-input {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 16px;
    background: #e0e0e0;
    font-size: 16px;
    color: #333;
    resize: vertical;
    font-family: inherit;
}

.text-input::placeholder {
    color: #666;
}

.text-input:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

.access-code-section {
    margin-bottom: 32px;
}

.access-code-input {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #e0e0e0;
    font-size: 16px;
    color: #333;
    text-align: center;
}

.access-code-input::placeholder {
    color: #666;
}

.access-code-input:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

.step-header {
    font-weight: 700;
    font-style: italic;
    text-align: center;
    margin-bottom: 8px;
    margin-top: 18px;
    font-size: 16px;
    color: #1a1a1a;
}
.step-header:first-child { margin-top: 0; }
.step-header em { color: #e74c3c; font-style: italic; }

.select-footage-btn {
    display: inline-block;
    color: #fff;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50px;
    padding: 12px 32px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}
.select-footage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ffc857 0%, #ffb143 100%);
    border: none;
    border-radius: 50px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 200, 87, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 200, 87, 0.6);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.progress-section {
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 24px;
    margin: 20px 0;
    min-height: 200px;
}

.progress-section[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
}

/* Hide section descriptions and autofill buttons when progress is shown (on mobile mainly) */
@media (max-width: 768px) {
    .progress-section[style*="display: block"] ~ .card .section-description-promo,
    .progress-section[style*="display: block"] ~ .card .section-description-compilation,
    .progress-section[style*="display: block"] ~ .card .autofill-btn-promo,
    .progress-section[style*="display: block"] ~ .card .autofill-btn-compilation {
        display: none !important;
    }
    
    /* Alternative method: hide when progress section is visible */
    body:has(.progress-section[style*="display: block"]) .section-description-promo,
    body:has(.progress-section[style*="display: block"]) .section-description-compilation,
    body:has(.progress-section[style*="display: block"]) .autofill-btn-promo,
    body:has(.progress-section[style*="display: block"]) .autofill-btn-compilation {
        display: none !important;
    }
}

.spinner {
    border: 5px solid #e0e0e0;
    border-top: 5px solid #1e88e5;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
    display: block;
}

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

#progress-text {
    font-size: 20px;
    font-weight: 700;
    color: #1e88e5;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
    display: block;
    min-height: 30px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.download-link {
    display: block;
    color: #1e88e5;
    font-size: 18px;
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

.download-link:hover {
    color: #1565c0;
}

.result-video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 24px;
    background: #000;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.footer {
    text-align: center;
    color: white;
}

.footer-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.95;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #1e88e5;
    background: rgba(30, 136, 229, 0.05);
}

.tab-btn.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
    background: rgba(30, 136, 229, 0.1);
}

.tab-content {
    /* Content is shown/hidden via JavaScript */
}

/* Section Description */
.section-description {
    background: white;
    border: 2px solid #1e88e5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.section-description p {
    font-size: 16px;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.6;
}

.section-description a {
    color: #1e88e5;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section-description a:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* Slide Section */
.slide-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #e0e0e0;
    border-radius: 12px;
}

.slide-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.slide-input {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    border: none;
    border-radius: 8px;
    background: #f5f5f5;
    font-size: 15px;
    color: #333;
    font-family: inherit;
}

.slide-input:last-child {
    margin-bottom: 0;
}

.slide-input::placeholder {
    color: #999;
}

.slide-input:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        padding: 24px;
    }

    .title {
        font-size: 26px;
    }

    .footer-title {
        font-size: 36px;
    }

    .footer-subtitle {
        font-size: 16px;
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .slide-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .card {
        padding: 20px;
    }

    .title {
        font-size: 22px;
    }

    .generate-btn {
        font-size: 18px;
    }
}

/* Stock Video Search Modal Styles */
.modal-overlay {
    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: 1000;
    padding: 20px;
}

.modal-content {
    background: #f5f5f5;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #ddd;
    position: relative;
    background: white;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    background: #d32f2f;
}

/* Mobile improvements for modal close button */
@media (max-width: 768px) {
    .modal-close-btn {
        width: 44px;
        height: 44px;
        font-size: 24px;
        top: 16px;
        right: 16px;
        /* Larger touch target for mobile */
    }
    
    /* Make modal header have more padding on mobile to avoid text overlap */
    .modal-header {
        padding: 24px 60px 24px 24px;
    }
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #1e88e5;
}

.search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
}

.search-btn:active {
    transform: translateY(0);
}

.video-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.video-result-item {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.video-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.video-result-item.selected {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.video-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.video-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: none;
}

.video-result-item.playing .video-thumbnail {
    display: none;
}

.video-result-item.playing .video-preview {
    display: block;
}

.video-info {
    padding: 12px;
}

.video-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-info p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.select-video-btn {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.select-video-btn:hover {
    background: #45a049;
}

.loading-message,
.error-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.error-message {
    color: #f44336;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .video-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

/* Caption Section Styles */
.caption-textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f5f5f5;
    font-size: 16px;
    color: #333;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    min-height: 200px;
}

.caption-textarea:focus {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
    border-color: #1e88e5;
    background: #fff;
}

.copy-caption-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-caption-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.copy-caption-btn:active {
    transform: translateY(0);
}

/* Instagram Handles Section Styles */
.instagram-handles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instagram-handle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.instagram-handle-item:hover {
    border-color: #1e88e5;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
}

.instagram-handle-item .handle-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: monospace;
}

.copy-handle-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-handle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.copy-handle-btn:active {
    transform: translateY(0);
}

.loading-handles {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 16px;
}

/* Autofill Modal Styles */
#promo-autofill-modal .modal-content,
#compilation-autofill-modal .modal-content {
    max-width: 600px;
    background: white;
}

#promo-autofill-modal .modal-body,
#compilation-autofill-modal .modal-body {
    padding: 32px;
}

/* Autofill Form Styling */
.modal-body label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.modal-body input[type="text"],
.modal-body input[type="password"],
.modal-body input[type="number"],
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: #f0f0f0;
    font-size: 15px;
    color: #333;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.modal-body input[type="text"]:focus,
.modal-body input[type="password"]:focus,
.modal-body input[type="number"]:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    outline: none;
    background: #e8e8e8;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.modal-body input[type="text"]::placeholder,
.modal-body input[type="password"]::placeholder,
.modal-body input[type="number"]::placeholder,
.modal-body textarea::placeholder {
    color: #999;
}

.modal-body textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.modal-body select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Form Groups with better spacing */
.modal-body > div {
    margin-bottom: 20px;
}

.modal-body > div:last-of-type {
    margin-bottom: 24px;
}

/* Grid layout for side-by-side inputs */
.modal-body > div[style*="grid"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-body > div[style*="grid"] > div {
    margin-bottom: 0;
}

/* Generate button in modal */
#generate-promo-text-btn,
#generate-compilation-text-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ffc857 0%, #ffb143 100%);
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 200, 87, 0.4);
    margin-top: 8px;
}

#generate-promo-text-btn:hover,
#generate-compilation-text-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 200, 87, 0.6);
}

#generate-promo-text-btn:active,
#generate-compilation-text-btn:active {
    transform: translateY(0);
}

#generate-promo-text-btn:disabled,
#generate-compilation-text-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner in modal */
#promo-autofill-loading,
#compilation-autofill-loading {
    text-align: center;
    padding: 20px 0;
}

#promo-autofill-loading .spinner,
#compilation-autofill-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin: 0 auto 12px;
}

#promo-autofill-loading p,
#compilation-autofill-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Video type toggle specific styling */
#promo-event-fields,
#promo-brand-fields {
    margin-top: 20px;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    #promo-autofill-modal .modal-content,
    #compilation-autofill-modal .modal-content {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    #promo-autofill-modal .modal-body,
    #compilation-autofill-modal .modal-body {
        padding: 20px;
    }

    .modal-body > div[style*="grid"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========== Bulk Editor Styles ========== */

/* Video thumbnail grid */
.bulk-video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
    padding: 0 10px;
}

.bulk-video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
}

.bulk-video-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.bulk-video-remove {
    color: #f44336;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 6px;
    line-height: 1;
    margin-top: 2px;
}

.bulk-video-remove:hover {
    color: #d32f2f;
}

/* Edit Details button - purple pill */
.bulk-edit-details-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.bulk-edit-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

/* Edit Details Overlay */
.bulk-edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 136, 229, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.bulk-edit-modal {
    position: relative;
    background: #f5f5f5;
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.bulk-edit-close-x {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #e74c3c;
    cursor: pointer;
    padding: 4px;
    z-index: 1;
    transition: transform 0.2s;
}
.bulk-edit-close-x:hover {
    transform: scale(1.15);
}

/* Bulk select dropdowns */
.bulk-select {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 50px;
    background: #e8e8e8;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    text-align: center;
    font-weight: 600;
}

/* Slider section */
.bulk-slider-section {
    margin: 20px 0;
}

.bulk-slider-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.bulk-slider-labels span {
    text-align: center;
    min-width: 80px;
    line-height: 1.3;
}

.bulk-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #9c27b0, #ff9800);
    outline: none;
}

.bulk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5a623;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.bulk-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5a623;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Bulk form fields */
.bulk-form-fields {
    margin-top: 20px;
}

.bulk-field-group {
    margin-bottom: 18px;
}

.bulk-input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 50px;
    background: #e8e8e8;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    transition: all 0.2s ease;
}

textarea.bulk-input {
    border-radius: 16px;
    resize: vertical;
    line-height: 1.5;
}

.bulk-input:focus {
    outline: none;
    background: #ddd;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.bulk-input::placeholder {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* Close Form button */
.bulk-close-form-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.bulk-close-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6);
}

/* Responsive for bulk editor */
@media (max-width: 768px) {
    .bulk-edit-modal {
        max-width: 100%;
        padding: 20px;
    }

    .bulk-slider-labels span {
        font-size: 13px;
        min-width: 60px;
    }
}

/* ========== Visual Style Selector ========== */

.style-selector-section {
    margin: 25px 0;
    text-align: center;
}

.style-selector-section h3 {
    font-weight: 700;
    font-style: italic;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

.style-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 10px;
}

.style-phone-card {
    cursor: pointer;
    border-radius: 12px;
    border: 3px solid transparent;
    padding: 4px;
    transition: all 0.2s ease;
    background: #f5f5f5;
}

.style-phone-card:hover {
    border-color: #90caf9;
}

.style-phone-card.selected {
    background: #e3f2fd;
    border-color: #42a5f5;
}

/* Style preview images */
.style-preview-img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Video-based promo style preview cards */
.promo-style-preview {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
}
.promo-style-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.promo-style-preview .ps-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: rgba(0,0,0,0.25);
    transition: background 0.2s;
    pointer-events: none;
}
.promo-style-preview .ps-play-btn::after {
    content: '';
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}
.promo-style-preview:hover .ps-play-btn { background: rgba(0,0,0,0.15); }
.promo-style-preview.playing .ps-play-btn { display: none; }
.promo-style-preview .ps-cat {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 5px;
    color: rgba(255,255,255,0.5);
    z-index: 1;
}
/* Column headers for promo style grid */
.ps-col-header {
    text-align: center; font-weight: 700; font-size: 13px;
    padding: 6px 0; color: #333;
    text-decoration: underline;
}

/* Responsive: 2 columns on mobile */
@media (max-width: 500px) {
    .style-selector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ========== Toast Notifications ========== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.35s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-removing {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #666;
}

.toast-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1e88e5, #42a5f5);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: toastProgressPulse 1.5s ease-in-out infinite;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #333;
}

/* Toast variants */
.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-uploading {
    border-left: 4px solid #1e88e5;
}

.toast-error {
    border-left: 4px solid #f44336;
}

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

@keyframes toastProgressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
