/* styles.css */

/* General Styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

a {
    color: #5C2D91;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    position: fixed; /* Make the navbar fixed */
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensure it stays on top */
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #5C2D91;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.nav-cta-button {
    margin-left: 20px;
    padding: 10px 20px;
    background-color: #5C2D91;
    color: #fff;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-cta-button:hover {
    background-color: #482074;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background-color: #333;
    margin-bottom: 4px;
    border-radius: 5px;
}

/* Enhanced Story Structurer Section */
.story-structurer-section {
    padding: 100px 20px 60px 20px; /* Top padding accounts for fixed header */
    background-color: #fff;
    text-align: center;
}

.story-structurer-section h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #5C2D91;
}

.story-structurer-section p {
    font-size: 18px;
    margin-bottom: 40px;
}

.builder-step {
    margin-bottom: 40px;
    text-align: left;
}

.builder-step h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #5C2D91;
}

.builder-step .form-group {
    margin-bottom: 20px;
}

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

.builder-step input[type="text"],
.builder-step textarea,
.builder-step select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.builder-step textarea {
    resize: vertical;
}

.cta-button {
    padding: 10px 20px;
    background-color: #5C2D91;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #482074;
}

.secondary-button {
    padding: 10px 20px;
    background-color: #fff;
    color: #5C2D91;
    border: 2px solid #5C2D91;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.secondary-button:hover {
    background-color: #5C2D91;
    color: #fff;
}

#titleResult,
#charactersList,
#plotResult,
#sceneResult,
#grammarResult,
#storyResult,
#compiledStory {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fdfdfd;
}

#characterItems,
#compiledCharacters,
#compiledScenes {
    list-style-type: disc;
    padding-left: 20px;
}

#compiledStory img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
}

/* Footer */
footer {
    background-color: #fff;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.footer-content {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.footer-content a {
    color: #5C2D91;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .nav-cta-button {
        margin-left: 0;
        margin-top: 15px;
    }

    .hamburger {
        display: flex;
    }

    .story-structurer-section {
        padding-top: 120px; /* Adjust padding for smaller screens */
    }

    .builder-step h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .builder-step {
        margin-bottom: 30px;
    }

    .cta-button,
    .secondary-button {
        width: 100%;
        margin-bottom: 10px;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

/* Additional Styles for Accessibility */
.navbar a:focus,
.navbar a:hover,
.cta-button:focus,
.cta-button:hover,
.secondary-button:focus,
.secondary-button:hover {
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 45, 145, 0.4);
}
