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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

.panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1d1d1f;
}

.section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 0;
    color: #1d1d1f;
}

.section-header.collapsible {
    cursor: pointer;
    justify-content: space-between;
}

.icon {
    font-size: 20px;
}

.chevron {
    font-size: 12px;
    color: #86868b;
}

.api-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #1d1d1f;
    font-weight: 500;
}

.info-value {
    background: #f5f5f7;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #1d1d1f;
    word-break: break-all;
}

.copy-btn {
    background: none;
    border: none;
    color: #007aff;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

.endpoint-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f5f5f7;
    border-radius: 8px;
    margin-top: 8px;
}

.method {
    background: #ff9500;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.path {
    font-size: 14px;
    color: #1d1d1f;
}

.api-key-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-key-section label {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.api-key-section input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.api-key-section input:focus {
    border-color: #007aff;
}

.save-btn {
    background: #007aff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.save-btn:hover {
    background: #0051d5;
}

.upload-area {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.upload-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.upload-placeholder:hover {
    background: #e8e8ed;
}

.upload-icon {
    font-size: 48px;
    color: #86868b;
    margin-bottom: 8px;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.options-section {
    margin-bottom: 20px;
}

.option-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.button-group {
    display: flex;
    gap: 12px;
}

.option-btn {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f7;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: #e8e8ed;
}

.option-btn.active {
    background: #1d1d1f;
    color: white;
}

.prompt-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.prompt-input:focus {
    border-color: #007aff;
}

.generate-btn {
    width: 100%;
    padding: 16px;
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.generate-btn:hover {
    background: #424245;
}

.generate-btn:disabled {
    background: #d2d2d7;
    cursor: not-allowed;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #f5f5f7;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #1d1d1f;
}

.progress-title {
    font-weight: 600;
}

.progress-estimate {
    color: #86868b;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e5ea;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #007aff, #0a84ff);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 13px;
    color: #1d1d1f;
}

.restrictions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.restrictions-table th,
.restrictions-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5ea;
    text-align: left;
    line-height: 1.5;
}

.restrictions-table thead th {
    font-weight: 600;
    color: #1d1d1f;
    background: #f5f5f7;
}

.restrictions-table tbody tr:last-child td {
    border-bottom: none;
}

.seo-panel .seo-section {
    margin-bottom: 20px;
}

.seo-panel .seo-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.seo-panel .seo-section p {
    font-size: 15px;
    color: #3a3a3c;
    line-height: 1.6;
}

.video-container {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868b;
    font-size: 16px;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #0051d5;
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .video-container {
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: #000;
        color: #f5f5f7;
    }
    
    .panel {
        background: #1d1d1f;
    }
    
    .panel-title,
    .section-header,
    .info-label,
    .option-label,
    .info-value,
    .path {
        color: #f5f5f7;
    }
    
    .info-value,
    .upload-placeholder,
    .option-btn,
    .endpoint-info {
        background: #2c2c2e;
    }
    
    .upload-placeholder:hover,
    .option-btn:hover {
        background: #3a3a3c;
    }
    
    .option-btn.active {
        background: #007aff;
        color: white;
    }
    
    .prompt-input {
        background: #2c2c2e;
        border-color: #3a3a3c;
        color: #f5f5f7;
    }
    
    .generate-btn {
        background: #007aff;
    }
    
    .generate-btn:hover {
        background: #0051d5;
    }
    
    .api-key-section input {
        background: #2c2c2e;
        border-color: #3a3a3c;
        color: #f5f5f7;
    }

    .progress-container {
        background: #2c2c2e;
    }

    .progress-header,
    .progress-status {
        color: #f5f5f7;
    }

    .progress-estimate {
        color: #98989d;
    }

    .progress-bar {
        background: #3a3a3c;
    }

    .restrictions-table thead th {
        background: #2c2c2e;
        color: #f5f5f7;
    }

    .restrictions-table th,
    .restrictions-table td {
        border-bottom: 1px solid #3a3a3c;
        color: #f5f5f7;
    }

    .seo-panel .seo-section h3 {
        color: #f5f5f7;
    }

    .seo-panel .seo-section p {
        color: #d1d1d6;
    }
}
