/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

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

/* Form sections */
.form-section {
    padding: 30px 40px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Slides header */
.slides-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.slides-header h2 {
    margin: 0;
}

/* Slide cards */
.slide-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.slide-card:hover {
    border-color: #0077B5;
}

.slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.slide-header h3 {
    margin: 0;
    color: #0077B5;
    font-size: 1.2rem;
}

.btn-remove-slide {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-remove-slide:hover {
    background: #dc2626;
}

/* Slide number badge */
.slide-number {
    display: inline-block;
    background: #0077B5;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Form rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Inputs */
input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0077B5;
    box-shadow: 0 0 0 3px rgba(0, 119, 181, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
    font-family: "Courier New", Courier, monospace;
}

/* Color inputs */
input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-label span {
    font-weight: 400;
}

/* Form actions */
.form-actions {
    padding: 30px 40px;
    background: #f9fafb;
    text-align: center;
}

/* Buttons */
button,
input[type="submit"] {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
}

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

.btn-secondary {
    background: white;
    color: #0077B5;
    border: 2px solid #0077B5;
    margin: 0 10px;
}

.btn-secondary:hover {
    background: #f0f9ff;
}

/* Loading state */
.loading {
    padding: 60px 40px;
    text-align: center;
}

.spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #0077B5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Result */
.result {
    padding: 40px;
    text-align: center;
}

.success {
    font-size: 1.2rem;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .form-section,
    .form-actions {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .slides-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .slide-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
