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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    padding: 30px;
}

/* Settings and Preview Layout */
.settings-preview-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .settings-preview-layout {
    grid-template-columns: 1fr;
    }
    
    .preview-column {
    order: -1; /* Show preview first on mobile */
    }
}

.settings-column {
    display: flex;
    flex-direction: column;
}

.preview-column {
    display: flex;
    flex-direction: column;
}

/* Sections */
.input-section,
.customization-section,
.preview-section,
.code-section,
.compatibility-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

h3 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 600;
}

.section-heading {
    color: #667eea;
    font-size: 1.1em;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Input Groups */
.url-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.text-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
}

.number-input,
.select-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.number-input:focus,
.select-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9em;
    padding: 5px;
}

.btn-link:hover {
    color: #764ba2;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group.full-width {
    grid-column: 1 / -1;
}

/* Checkboxes and Radio Buttons */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1em;
    color: #333;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Thumbnail Section */
.thumbnail-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.thumbnail-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

/* Status Messages */
.status-message,
.warning-message,
.info-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.95em;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.info-message {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.info-message.show {
    display: block;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #667eea;
    font-size: 0.9em;
    margin-left: 5px;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 280px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    line-height: 1.5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Video Preview */
.video-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    background: #000;
}

.video-container video {
    display: block;
    max-width: 100%;
    height: auto;
}

.video-container.responsive {
    width: 100%;
}

.video-container.responsive video {
    width: 100%;
    height: auto;
}

/* Frame Styles */
.video-container.frame1 {
    border: none;
}

.video-container.frame2 {
    border: 3px solid #333;
}

.video-container.frame3 {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container.frame4 {
    border: 5px solid #ddd;
    box-shadow: 0 0 0 3px #333;
}

.video-container.frame5 {
    border: 3px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

.video-container.frame6 {
    border: 3px double #333;
}

.video-container.frame7 {
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.video-container.frame8 {
    border: 20px solid #000;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.video-container.frame9 {
    border: 4px solid;
    border-image: linear-gradient(45deg, #667eea, #764ba2) 1;
}

.video-container.frame10 {
    border: 3px solid #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8), inset 0 0 30px rgba(0, 255, 255, 0.3);
}

/* Custom Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-controls.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Control Styles */
.custom-controls.style1 {
    background: linear-gradient(to top, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
}

.custom-controls.style2 {
    background: rgba(30, 30, 30, 0.95);
}

.custom-controls.style3 {
    background: rgba(245, 245, 245, 0.95);
    color: #222;
}

.custom-controls.style4 {
    background: rgba(0, 20, 40, 0.95);
    border-top: 2px solid #00ffff;
    box-shadow: 0 -5px 15px rgba(0, 255, 255, 0.3);
    color: #00ffff;
}

.custom-controls.style5 {
    background: rgba(250, 250, 250, 0.95);
    color: #333;
}

.custom-controls.style6 {
    background: rgba(0, 0, 0, 0.95);
    border-top: 2px solid #ffff;
}

.custom-controls.style7 {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.custom-controls.style8 {
    background: linear-gradient(to top, rgba(255, 107, 107, 0.95), rgba(254, 202, 87, 0.95));
    border-top: 2px solid #fff;
}

.custom-controls.style9 {
    background: rgba(30, 136, 229, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.custom-controls.style10 {
    background: rgba(224, 229, 236, 0.95);
    box-shadow: inset 2px 2px 5px rgba(184, 185, 190, 0.5), inset -3px -3px 7px rgba(255, 255, 255, 0.5);
    color: #333;
}

.control-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    min-height: 35px;
    transition: transform 0.2s, opacity 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.play-icon {
    display: inline-block;
    line-height: 1;
    font-size: 1em;
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.progress-filled {
    height: 100%;
    background: #ffff;
    width: 0%;
    transition: width 0.1s;
}

/* Progress bar colors for different styles */
.custom-controls.style1 .progress-bar {
    background: rgba(255, 255, 255, 0.3);
}

.custom-controls.style1 .progress-filled {
    background: #ffff;
}

.custom-controls.style2 .progress-bar {
    background: rgba(255, 255, 255, 0.2);
}

.custom-controls.style2 .progress-filled {
    background: #4CAF50;
}

.custom-controls.style3 .progress-bar {
    background: rgba(0, 0, 0, 0.2);
}

.custom-controls.style3 .progress-filled {
    background: #667eea;
}

.custom-controls.style4 .progress-bar {
    background: rgba(0, 255, 255, 0.2);
}

.custom-controls.style4 .progress-filled {
    background: #00ffff;
}

.custom-controls.style5 .progress-bar {
    background: rgba(0, 0, 0, 0.15);
}

.custom-controls.style5 .progress-filled {
    background: #764ba2;
}

.custom-controls.style6 .progress-bar {
    background: rgba(255, 255, 255, 0.3);
}

.custom-controls.style6 .progress-filled {
    background: #ffff;
}

.custom-controls.style7 .progress-bar {
    background: rgba(255, 255, 255, 0.2);
}

.custom-controls.style7 .progress-filled {
    background: rgba(255, 255, 255, 0.9);
}

.custom-controls.style8 .progress-bar {
    background: rgba(255, 255, 255, 0.4);
}

.custom-controls.style8 .progress-filled {
    background: #ffff;
}

.custom-controls.style9 .progress-bar {
    background: rgba(255, 255, 255, 0.3);
}

.custom-controls.style9 .progress-filled {
    background: #ffff;
}

.custom-controls.style10 .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.custom-controls.style10 .progress-filled {
    background: #667eea;
}

.time-display {
    font-size: 0.85em;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

.volume-slider {
    width: 80px;
    cursor: pointer;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 3px;
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    cursor: pointer;
    border-radius: 50%;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

/* Volume slider colors for different styles */
.custom-controls.style2 .volume-slider {
    background: rgba(255, 255, 255, 0.3);
}

.custom-controls.style2 .volume-slider::-webkit-slider-thumb {
    background: #4CAF50;
}

.custom-controls.style2 .volume-slider::-moz-range-thumb {
    background: #4CAF50;
}

.custom-controls.style3 .volume-slider {
    background: rgba(0, 0, 0, 0.2);
}

.custom-controls.style3 .volume-slider::-webkit-slider-thumb {
    background: #667eea;
}

.custom-controls.style3 .volume-slider::-moz-range-thumb {
    background: #667eea;
}

.custom-controls.style4 .volume-slider {
    background: rgba(0, 255, 255, 0.2);
}

.custom-controls.style4 .volume-slider::-webkit-slider-thumb {
    background: #00ffff;
}

.custom-controls.style4 .volume-slider::-moz-range-thumb {
    background: #00ffff;
}

.custom-controls.style5 .volume-slider {
    background: rgba(0, 0, 0, 0.15);
}

.custom-controls.style5 .volume-slider::-webkit-slider-thumb {
    background: #764ba2;
}

.custom-controls.style5 .volume-slider::-moz-range-thumb {
    background: #764ba2;
}

.custom-controls.style10 .volume-slider {
    background: rgba(0, 0, 0, 0.1);
}

.custom-controls.style10 .volume-slider::-webkit-slider-thumb {
    background: #667eea;
}

.custom-controls.style10 .volume-slider::-moz-range-thumb {
    background: #667eea;
}

/* Code Output */
.code-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.code-output {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.code-output pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-output code {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Compatibility Grid */
.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.compat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.compat-item h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.compat-item ul {
    list-style: none;
    padding: 0;
}

.compat-item li {
    padding: 5px 0;
    color: #555;
}

.compat-item li:before {
    content: "• ";
    color: #667eea;
    font-weight: bold;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
    font-size: 1.8em;
    }

    .url-input-group {
    flex-direction: column;
    }

    .options-grid {
    grid-template-columns: 1fr;
    }

    .checkbox-grid {
    grid-template-columns: 1fr;
    }

    .code-actions {
    flex-direction: column;
    }
}

/* Make custom thumbnail input full-width */
#customThumbnail {
    width: 100%;
    box-sizing: border-box;
    display: block;
}