:root {
    --primary-red: #e63946;
    --secondary-red: #d62828;
    --white: #ffffff;
    --off-white: #f5f7fa;
    --bg-gray: #f0f2f5;
    --light-blue: #a8dadc;
    --medium-blue: #457b9d;
    --dark-blue: #1d3557;
    --slate-gray: #708090;
    --light-gray: #f8f9fa;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark-blue);
    background-color: var(--bg-gray);
    line-height: 1.6;
    background-image: linear-gradient(to bottom right, var(--bg-gray), var(--off-white));
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Navbar Styles */
.navbar {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-red);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.5rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--slate-gray);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.progress-step.active .step-number {
    background-color: var(--primary-red);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background-color: #28a745;
}

.step-label {
    font-size: 0.9rem;
    color: var(--slate-gray);
    text-align: center;
}

/* Main Content Sections */
.step-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    transition: var(--transition);
    border-top: 4px solid var(--primary-red);
}

.step-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-red));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 1.5rem;
}

.hero p.lead {
    font-size: 1.25rem;
    color: var(--slate-gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

h2 {
    position: relative;
    padding-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-red);
}

/* Loading Animation */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading-fact {
    margin-top: 2rem;
    color: var(--slate-gray);
    font-style: italic;
    transition: opacity 0.5s ease;
    min-height: 50px;
}

/* Slide Editing Interface */
.slide-item {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
}

.slide-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-red);
}

.slide-item h5 {
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slide-item h5:before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background-color: var(--primary-red);
    border-radius: 2px;
    margin-right: 8px;
}

.slide-item textarea {
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: 100%;
    min-height: 120px;
    resize: vertical;
    background-color: var(--off-white);
    transition: var(--transition);
}

.slide-item textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.1);
    outline: none;
}

.edit-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0;
}

.slide-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.slide-controls button {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 4px;
}

/* Theme Selection */
.themes-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 1rem;
}

.theme-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.theme-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.theme-card .card-body {
    padding: 1rem;
}

/* Form Elements */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    background-color: var(--secondary-red);
    border-color: var(--secondary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
    background-color: var(--white);
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-secondary:hover {
    background-color: var(--bg-gray);
    border-color: var(--secondary-red);
    color: var(--secondary-red);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.7;
    transform: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero, .step-section {
    animation: fadeIn 0.6s ease-out;
}

.spinner-border {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-step {
        flex-direction: row;
        gap: 1rem;
    }
    
    .step-label {
        margin: 0;
    }
}
