/* Main container */
.main-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    background: white;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 30px;
    align-items: flex-start;
}

/* Input section */
.input-section {
    background: #f4f8fb;
    border-radius: 20px;
    padding: 20px;
    width: 612px;
    height: 445px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #000000;
    line-height: 16.8px;
}

.form-group textarea,
.form-group select {
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 5px;
    background: white;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    min-width: 240px;
    max-width: 900px;
}

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

.form-group textarea::placeholder {
    color: #999;
}

.form-group select {
    height: 39px;
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.form-row .form-group:first-child {
    width: 239px;
}

.form-row .form-group:last-child {
    flex: 1;
}

/* Button groups */
.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.variation-btn,
.length-btn {
    flex: 1;
    min-width: 50px;
    min-height: 39px;
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 5px;
    background: white;
    color: #757575;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.length-btn {
    min-width: 100px;
}

.variation-btn:hover,
.length-btn:hover {
    background: #f8f9fa;
}

.variation-btn.active,
.length-btn.active {
    border-color: #fb5343;
    color: #fb5343;
    background: white;
}

/* Generate button */
.generate-btn {
    width: 100%;
    height: 46px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, rgba(255,221,85,1) 0%, rgba(255,84,62,1) 50%, rgba(200,55,171,1) 100%);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

/* Disabled state - prevent hover effects */
.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(45deg, rgba(255,221,85,1) 0%, rgba(255,84,62,1) 50%, rgba(200,55,171,1) 100%);
}

.generate-btn:disabled:hover {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(45deg, rgba(255,221,85,1) 0%, rgba(255,84,62,1) 50%, rgba(200,55,171,1) 100%);
}

/* Hover state for enabled button only */
.generate-btn:not(:disabled):hover {
    opacity: 0.9;
}

.generate-btn:hover {
    opacity: 0.9;
}

/* Results section */
.results-section {
    width: 616px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.results-section .heading {
    font-weight: 700;
    font-size: 24px;
    color: #0a0d12 !important;
    line-height: 28.8px;
    text-align: left;
}

/* Results card */
.results-card {
    border: 1px dashed #dbdbdb;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 30px;
    background: white;
    flex-direction: column;
}

.results-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 232px;
}

.stat {
    font-weight: 700;
    font-size: 16px;
    color: #757575;
    line-height: 16px;
    white-space: nowrap;
}

.separator {
    width: 2px;
    height: 17px;
    background: #dbdbdb;
}

.results-text {
    font-size: 16px;
    color: #606060 !important;
    line-height: 24px;
    margin: 0;
}

.results-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.results-controls.active {
    opacity: 1;
}

.navigation-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    width: 50px;
    height: 34px;
    padding: 8px;
    background: #fb5343;
    border: 1px solid #fb5343;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #e04435;
    border-color: #e04435;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-btn {
    transform: rotate(180deg);
}

.copy-btn {
    width: 96px;
    height: 34px;
    padding: 8px 15px;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.copy-btn span {
    font-weight: 700;
    font-size: 14px;
    color: #757575;
    line-height: 16px;
    white-space: nowrap;
}

.copy-btn svg {
    width: 20px;
    height: 20px;
    color: #757575;
}

.image-text {
    text-align: left;
}

.mobile-variations { display: none; }
.desktop-variations { display: flex; }

@media (max-width: 1220px) {
    .mobile-variations { display: flex; flex-direction: column; gap: 20px; }
    .desktop-variations { display: none; }

    .main-container {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        width: 100%; /* <-- Add this line */
        max-width: 100%; /* <-- Add this line for extra safety */
        box-sizing: border-box; /* <-- Add this to prevent overflow from padding */
    }
    
    .input-section,
    .results-section {
        width: 100%;
    }
    
    .input-section {
        height: auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-row .form-group:first-child {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    
    .results-card {
        flex-direction: column;
        gap: 20px;
    }
    
    .results-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .stats-bar {
        width: 100%;
        justify-content: flex-start;
    }

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

@media (max-width: 480px) {    
    .variation-btn,
    .length-btn {
        min-width: auto;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .generate-btn {
    background: #ccc;
    cursor: not-allowed;
}

.success .results-controls {
    opacity: 1;
}

.active-dark-mode .caption-2 h2, .active-dark-mode .caption-2 .text {
    color: #000000 !important;
}

.active-dark-mode .caption-1 .text-section .heading {
    color: #fff !important;
}

.active-dark-mode .caption-1 .step-heading {
    color: #fff;
}
