/**
 * Yes or No Generator Styles
 */

/* Generator Layout */
.generator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.generator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.generator-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.generator-description {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.generator-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.generator-main {
    min-width: 0;
}

.generator-settings {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.settings-card h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.938rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    font-size: 0.813rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

/* Info Section */
.generator-info {
    max-width: 1200px;
    margin: 0 auto;
}

.info-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-section h2 {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-section p {
    color: #4b5563;
    line-height: 1.7;
    font-size: 1rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.use-case-card {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.use-case-card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.use-case-card h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.use-case-card p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.938rem;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: #4b5563;
    line-height: 1.6;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.25rem;
}

/* Answer Display */
.answer-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.question-display {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    display: none;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    font-style: italic;
    line-height: 1.4;
}

.answer-display {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.answer-placeholder {
    text-align: center;
    color: #9ca3af;
}

.answer-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.answer-placeholder p {
    font-size: 1.125rem;
    margin: 0;
}

/* Answer Result */
.answer-result {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: answerAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.2s ease;
}

.answer-result:hover {
    transform: scale(1.05);
}

.answer-text {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 0 1.5rem;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
}

/* Smaller font for longer words (7+ characters) */
.answer-text.long-text {
    font-size: 2.5rem;
    letter-spacing: 0.02em;
}

/* Even smaller for very long words (10+ characters) */
.answer-text.very-long-text {
    font-size: 2rem;
    letter-spacing: 0;
}

@keyframes answerAppear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Thinking Animation */
.answer-thinking {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    font-weight: 900;
    color: white;
    animation: thinking 0.6s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.answer-display.thinking .answer-thinking {
    animation: thinking 0.6s ease-in-out infinite, rotate 1.5s linear infinite;
}

@keyframes thinking {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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

/* History Section */
.history-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.history-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: #f9fafb;
    transform: translateX(4px);
}

.history-result {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 1rem;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    padding: 0 0.25rem;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.1;
}

/* Smaller font for longer words in history */
.history-result.long-text {
    font-size: 0.75rem;
    letter-spacing: -0.02em;
}

.history-result.very-long-text {
    font-size: 0.65rem;
    letter-spacing: -0.03em;
}

.history-details {
    flex: 1;
    min-width: 0;
}

.history-question {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-time {
    font-size: 0.813rem;
    color: #6b7280;
}

.no-history {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    margin: 0;
}

/* Settings Panel */
.settings-card textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Button Styles */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-primary svg {
    flex-shrink: 0;
}

.btn-clear {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: #ef4444;
    color: white;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-weight: 500;
    color: #1f2937;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1f2937;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .generator-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .generator-settings {
        position: static;
        order: -1;
    }

    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .generator-container {
        padding: 1rem;
    }

    .generator-header h1 {
        font-size: 2rem;
    }

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

    .answer-card {
        padding: 2rem 1rem;
        min-height: 300px;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .answer-result {
        width: 200px;
        height: 200px;
    }

    .answer-text {
        font-size: 3rem;
    }

    /* Adjust text sizing for mobile answer display */
    .answer-text.long-text {
        font-size: 2rem;
    }

    .answer-text.very-long-text {
        font-size: 1.5rem;
    }

    .answer-thinking {
        width: 200px;
        height: 200px;
        font-size: 4rem;
    }

    .history-item {
        padding: 0.5rem;
    }

    .history-result {
        width: 50px;
        height: 50px;
        font-size: 0.875rem;
    }

    /* Adjust text sizing for mobile history items */
    .history-result.long-text {
        font-size: 0.65rem;
    }

    .history-result.very-long-text {
        font-size: 0.55rem;
    }

    .settings-card {
        padding: 1.5rem;
    }

    .info-section {
        padding: 1.5rem;
    }

    .toast-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}
