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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #000000;
    min-height: 100vh;
    font-size: 16px; /* Base font size for mobile */
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
}

header h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.2;
}

header p {
    font-size: 1rem;
    opacity: 0.8;
    color: #cccccc;
    line-height: 1.4;
}

/* Form styles */
.style-form {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
    border: 1px solid #333333;
}

/* Progress indicator styles */
.form-progress {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #333333;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #666666 0%, #888888 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 20%; /* Start at 20% for step 1 */
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #333333;
    color: #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step-indicator.active {
    background: #666666;
    color: #ffffff;
}

.step-indicator.completed {
    background: #888888;
    color: #ffffff;
}

.progress-text {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
}

/* Form step styles */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-step h2 {
    color: #ffffff;
    font-size: 1.3rem; /* Start with mobile size */
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.3;
}

.step-description {
    color: #cccccc;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Step navigation styles */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center !important;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

/* Override global button alignment for step navigation */
.step-navigation button {
    align-items: center !important;
    align-self: center !important;
}

/* Hide placeholder in first step */
.btn-placeholder {
    visibility: hidden;
    pointer-events: none;
}

/* Remove the margin-left approach since it doesn't work with single button */

.btn-prev,
.btn-next {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444444;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-prev:hover,
.btn-next:hover {
    background: #3a3a3a;
    border-color: #555555;
    color: #ffffff;
}

.btn-prev:focus,
.btn-next:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.2);
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* On last step, hide next button and show submit */
.form-step:last-child .btn-next {
    display: none;
}

.form-step:last-child .submit-btn {
    margin-left: auto;
}

.form-section {
    margin-bottom: 30px; /* Reduced for mobile */
    padding-bottom: 20px;
    border-bottom: 1px solid #333333;
}

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

.form-section h2 {
    color: #ffffff;
    font-size: 1.3rem; /* Start with mobile size */
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.3;
}

.form-section h2.clickable {
    cursor: pointer;
}

.section-description {
    color: #cccccc;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 20px; /* Reduced for mobile */
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #333333;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
    background: #2a2a2a;
    color: #e0e0e0;
    min-height: 44px; /* Touch-friendly minimum height */
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #666666;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.2);
    background: #333333;
}

.form-group input[type="text"].error,
.form-group textarea.error,
.form-group select.error {
    border-color: #ff6b6b;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Error message styles */
.error-message {
    background: #2a1a1a;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.field-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 1.2em;
}

/* Progress indicator styles */
.progress-indicator {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #cccccc;
    text-align: center;
}

/* Submit button styles */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    color: #ffffff;
    border: none;
    padding: 15px 30px; /* Reduced horizontal padding for mobile */
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-height: 48px; /* Touch-friendly minimum height */
    width: 100%; /* Full width on mobile */
    max-width: 300px; /* Limit width on larger screens */
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #444444 0%, #666666 100%);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.3);
}

/* Loading styles */
.loading {
    text-align: center;
    padding: 30px 20px; /* Reduced padding for mobile */
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333333;
}

.spinner {
    width: 40px; /* Smaller for mobile */
    height: 40px;
    border: 4px solid #333333;
    border-top: 4px solid #666666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading p {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.4;
}

/* Results styles */
.results {
    padding: 5px;
    border-radius: 10px;
    margin-top: 10px;
}

.results h2 {
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.4rem;
}

.ai-response {
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.analysis-header {
    margin-bottom: 10px;
    text-align: center;
}

.concept-name {
    color: #ffffff;
    font-size: 1.6rem;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.2;
}

.concept-statement {
    font-size: 1rem;
    color: #cccccc;
    line-height: 1.5;
    font-style: italic;
}

.visual-components {
    margin-top: 10px;
}

.visual-components h4 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 2px solid #666666;
    padding-bottom: 4px;
}

.component-category {
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 8px;
}

.component-category h5 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: 600;
    border-bottom: 1px solid #333333;
    padding-bottom: 2px;
}

.component-details {
    display: grid;
    gap: 4px;
}

.detail-item {
    padding: 2px 0;
    border-bottom: 1px solid #333333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #e0e0e0;
    font-weight: 600;
}

.generated-image {
    text-align: center;
}

.generated-image h3 {
    color: #ffffff;
    font-size: 1.2rem; /* Start with mobile size */
    margin-bottom: 15px;
    font-weight: 600;
}

.generated-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Focus management for keyboard navigation */
*:focus {
    outline: 2px solid #666666;
    outline-offset: 2px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #333333;
    color: #ffffff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Responsive design - Mobile first approach */
/* Tablet and up */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 30px;
    }

    .style-form {
        padding: 30px;
    }

    header {
        margin-bottom: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1.1rem;
    }

    .form-section {
        margin-bottom: 15px;
    }

    .form-section h2 {
        font-size: 1.4rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .submit-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .loading {
        padding: 30px;
    }

    .spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .loading p {
        font-size: 1.1rem;
    }

    .results {
        padding: 8px;
    }

    .results h2 {
        font-size: 1.6rem;
    }

    .ai-response {
        padding: 12px;
    }

    .concept-name {
        font-size: 1.7rem;
    }

    .concept-statement {
        font-size: 1.1rem;
    }

    .visual-components {
        margin-top: 8px;
    }

    .visual-components h4 {
        font-size: 1.3rem;
    }

    .component-category {
        padding: 8px;
    }

    .component-category h5 {
        font-size: 1.1rem;
    }

    .component-details {
        gap: 4px;
    }

    .detail-item {
        font-size: 1rem;
    }

    .generated-image h3 {
        font-size: 1.4rem;
    }
}

/* Desktop and up */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 40px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .style-form {
        padding: 40px;
    }

    .results {
        padding: 10px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 50px;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .style-form {
        padding: 15px;
        border-radius: 8px;
    }

    header {
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .form-section {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }

    .form-section h2 {
        font-size: 1.2rem;
    }

    .section-description {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input[type="text"],
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .loading {
        padding: 20px 15px;
    }

    .loading p {
        font-size: 0.9rem;
    }

    .results {
        padding: 15px;
    }

    .ai-response {
        padding: 15px;
        margin-bottom: 20px;
    }

    .concept-name {
        font-size: 1.4rem;
    }

    .concept-statement {
        font-size: 0.9rem;
    }

    .visual-components h4 {
        font-size: 1.1rem;
    }

    .component-category {
        padding: 12px;
        margin-bottom: 15px;
    }

    .component-category h5 {
        font-size: 0.95rem;
    }

    .detail-item {
        font-size: 0.85rem;
        padding: 5px 0;
    }

    .generated-image h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
}

/* Concepts container for three-column layout */
.concepts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.concept-card {
    border-radius: 8px;
    padding: 10px;
}

.concept-header {
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #333333;
}

.concept-name {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.2;
}

.concept-statement {
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.4;
    font-style: italic;
}

.concept-image {
    margin: 8px 0;
    text-align: center;
}

.concept-visualization {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #333333;
}

.image-placeholder {
    background: #2a2a2a;
    border: 2px dashed #666666;
    border-radius: 6px;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #333333;
    border-top: 3px solid #666666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.image-placeholder p {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

.concept-components {
    margin-top: 8px;
}

.concept-components h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 1px solid #333333;
    padding-bottom: 4px;
}

/* Concept section styles */
.concept-section {
    margin-bottom: 40px;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333333;
}

.concept-title {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #666666;
    padding-bottom: 10px;
}

.concept-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Living room - large image */
.living-room-image {
    width: 100%;
    text-align: center;
}

.living-room-image .concept-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #333333;
}

.image-caption {
    color: #cccccc;
    font-size: 1rem;
    margin-top: 10px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Rooms grid - 2x3 layout */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
}

.room-image {
    text-align: center;
}

.room-image .concept-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-image .concept-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.room-image .image-caption {
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Image loading states */
.concept-image[src=""] {
    display: none;
}

.concept-image.loading {
    background: #2a2a2a;
    border: 2px dashed #666666;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    font-style: italic;
    min-height: 200px;
}

.concept-image.error {
    background: #2a1a1a;
    border: 2px dashed #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    font-style: italic;
    min-height: 200px;
}

.concept-image.error::before {
    content: "⚠️ Failed to load image";
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive design for concept images */
@media (min-width: 768px) {
    .concept-section {
        padding: 30px;
    }

    .concept-title {
        font-size: 2rem;
    }

    .rooms-grid {
        gap: 20px;
    }

    .room-image .concept-image {
        max-height: 350px;
    }
}

@media (min-width: 1024px) {
    .concept-section {
        padding: 40px;
    }

    .concept-title {
        font-size: 2.2rem;
    }

    .rooms-grid {
        gap: 25px;
    }

    .room-image .concept-image {
        max-height: 400px;
    }

    .image-caption {
        font-size: 1.1rem;
    }

    .room-image .image-caption {
        font-size: 1rem;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    .concept-section {
        padding: 15px;
        margin-bottom: 30px;
    }

    .concept-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .concept-images {
        gap: 15px;
    }

    .rooms-grid {
        gap: 10px;
    }

    .room-image .concept-image {
        max-height: 250px;
    }

    .image-caption {
        font-size: 0.85rem;
        margin-top: 8px;
    }

    .room-image .image-caption {
        font-size: 0.8rem;
    }
}

/* Responsive design for concepts */
@media (min-width: 768px) {
    .concepts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .concepts-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .concept-card {
        padding: 25px;
    }

    .concept-name {
        font-size: 1.4rem;
    }

    .concept-statement {
        font-size: 0.95rem;
    }
} 