:root {
    /* Keep any specific vars but use the main branding colors */
    --success-color: var(--scicanvas-success);
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: var(--scicanvas-background);
    --dark-color: var(--scicanvas-text-dark);
    --white: var(--scicanvas-surface);
    --light-gray: #e9ecef;
    --medium-gray: #ced4da;
    --dark-gray: var(--scicanvas-text-light);
    --black: var(--scicanvas-text-dark);
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;

    /* Light theme default values */
    --background-color: var(--white);
    --text-color: var(--black);
    --border-color: var(--medium-gray);
    --card-background: var(--white);
    --input-background: var(--white);
    --input-border: var(--medium-gray);
    --button-text: var(--white);
    --progress-background: var(--light-gray);
}

/* Dark theme values */
[data-theme="dark"] {
    --background-color: #1a1d21;
    --text-color: var(--white);
    --border-color: #2c3036;
    --card-background: #2c3036;
    --input-background: #3a3f44;
    --input-border: #52575d;
    --button-text: var(--white);
    --progress-background: #3a3f44;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    /* ADD THESE LINES: */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    /* REMOVE: min-height: 100vh; */
    /* REMOVE: display: flex; */
    /* REMOVE: flex-direction: column; */
    /* ADD THIS LINE: */
    flex: 1;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

header .header-content {
    display: flex;
    align-items: center;
}

header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* Logo styling */
.scicanvas-logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.scicanvas-logo a {
  text-decoration: none !important;
}

.scicanvas-logo img {
    height: 40px;
    margin-right: 10px;
}

.scicanvas-logo span {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Theme Toggle Switch */
.theme-toggle {
    position: relative;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-label {
    position: relative;
    display: block;
    width: 60px;
    height: 30px;
    background-color: var(--card-background);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.theme-toggle-label i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.theme-toggle-label .fa-moon {
    left: 10px;
    color: #f1c40f;
    opacity: 0;
}

.theme-toggle-label .fa-sun {
    right: 10px;
    color: #f39c12;
    opacity: 1;
}

.toggle-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition);
}

#theme-toggle-checkbox:checked + .theme-toggle-label .toggle-ball {
    left: 32px;
}

#theme-toggle-checkbox:checked + .theme-toggle-label .fa-moon {
    opacity: 1;
}

#theme-toggle-checkbox:checked + .theme-toggle-label .fa-sun {
    opacity: 0;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    max-width: 100%;
    width: 100%;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background-color: var(--progress-background);
    z-index: 1;
}

.progress {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background-color: var(--primary-color);
    transition: var(--transition);
    z-index: 2;
}

.step {
    width: 35px;
    height: 35px;
    background-color: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    z-index: 3;
    transition: var(--transition);
}

.step.active {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: var(--white);
}

.step.completed {
    border-color: var(--success-color);
    background-color: var(--success-color);
    color: var(--white);
}

/* Main Content */
main {
    flex: 1;
    margin-bottom: 30px;
}

.step-content {
    display: none;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    animation: fadeIn 0.5s;
}

.step-content.active {
    display: block;
}

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

.step-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.step-content p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-color);
}

/* Options Styling */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.option:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 111, 165, 0.05);
}

.option input[type="radio"],
.option input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--primary-color);
    cursor: pointer;
    z-index: 1;
}

.option label {
    cursor: pointer;
    flex: 1;
    padding: 5px 0;
    margin: -5px 0;
    width: 100%;
    z-index: 0;
}

/* Add clickable overlay to make the entire option clickable */
.option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 0;
}

/* Button Styles */
.buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.prev-btn {
    background-color: var(--secondary-color);
    color: var(--button-text);
}

.prev-btn:hover {
    background-color: #5a6268;
}

.next-btn {
    background-color: var(--primary-color);
    color: var(--button-text);
}

.next-btn:hover {
    background-color: var(--primary-dark);
}

.next-btn:disabled,
.download-btn:disabled {
    background-color: var(--dark-gray);
    cursor: not-allowed;
    opacity: 0.7;
}

.download-btn {
    background-color: var(--primary-color);
    color: var(--button-text);
}

.download-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.restart-btn {
    background-color: var(--accent-color);
    color: var(--button-text);
}

.restart-btn:hover {
    background-color: #3aa0c9;
}

/* Template Form Styling */
.template-details {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.selected-template-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.selected-template-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.selected-template-info ul {
    list-style: none;
}

.selected-template-info ul li {
    margin-bottom: 5px;
    display: flex;
    gap: 5px;
}

.selected-template-info ul li i {
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    background-color: var(--input-background);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

/* Download Screen */
.download-container {
    text-align: center;
    padding: 30px 20px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.download-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.format-selection {
    margin: 20px 0;
}

.format-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Footer Styles */
.scicanvas-footer {
    background: #1a1a1a;
    color: white;
    width: 100%;
    padding: 40px 0 20px 0;
    margin-top: auto; /* This pushes footer to bottom */
}

/* Add this new style for footer content: */
.scicanvas-footer .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    flex: none; /* Override the flex: 1 from main container */
}

.scicanvas-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

.scicanvas-footer-logo {
    flex: 1;
}

.scicanvas-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.scicanvas-footer-logo p {
    color: #ccc;
    margin: 0;
    font-size: 14px;
}

.scicanvas-footer-links {
    display: flex;
    gap: 40px;
    flex: 2;
}

.scicanvas-footer-links-column {
    flex: 1;
}

.scicanvas-footer-links-column h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.scicanvas-footer-links-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scicanvas-footer-links-column li {
    margin-bottom: 8px;
}

.scicanvas-footer-links-column a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.scicanvas-footer-links-column a:hover {
    color: var(--primary-color);
}

.scicanvas-footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
}

.scicanvas-footer-bottom p {
    color: #999;
    font-size: 14px;
    margin: 0;
}
.save-progress {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.save-progress button {
    background-color: var(--secondary-color);
    color: var(--button-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-progress button:hover {
    background-color: #5a6268;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transform: translateX(200%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .theme-toggle {
        align-self: flex-end;
    }
    
    .step {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .save-progress {
        flex-direction: column;
    }
}

/* Fix accessibility of radio buttons and checkboxes */
.option input[type="radio"] + label::before,
.option input[type="checkbox"] + label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 0;
}
