/* Base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--color-text-light);
}

#api-response {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--color-bg-alt);
    border-radius: 0.5rem;
}

/* Feedback Button */
.feedback-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    z-index: 90;
}

.feedback-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.modal {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.modal > p {
    color: var(--color-text-light);
    margin: 0 0 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.submit-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-button:hover {
    background: var(--color-primary-dark);
}

.submit-button:disabled {
    background: var(--color-text-light);
    cursor: not-allowed;
}

/* Feedback Success State */
.feedback-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

.feedback-success.show {
    display: block;
}

.feedback-success .success-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.feedback-success h4 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.feedback-success p {
    color: var(--color-text-light);
    margin: 0;
}

#feedbackForm.hidden {
    display: none;
}

@media (max-width: 768px) {
    .feedback-button {
        bottom: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
