/* ============================================
   FeedDuck - Responsive Feedback Form Styles
   Mobile-first design for all devices
   ============================================ */

:root {
    --primary: #de5833;
    --primary-dark: #c74d2c;
    --primary-light: #ff6b47;
    --positive: #4caf50;
    --negative: #f44336;
    --text: #333;
    --text-light: #666;
    --bg: #f7f7f7;
    --white: #fff;
    --border: #ddd;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Layout
   ============================================ */

.container {
    max-width: 600px;
    width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
    flex: 1;
}

@media (min-width: 768px) {
    .container {
        margin: 2rem auto;
    }
}

/* ============================================
   Header
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
}

.logo {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ============================================
   Form Container
   ============================================ */

.feedback-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px var(--shadow);
}

@media (min-width: 768px) {
    .feedback-form {
        padding: 2.5rem;
    }
}

/* ============================================
   Form Elements
   ============================================ */

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-size: 1rem;
    text-align: center;
}

.required {
    color: var(--negative);
}

/* ============================================
   Sentiment Buttons
   ============================================ */

.sentiment-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sentiment-buttons input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sentiment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    min-height: 120px;
}

.sentiment-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.sentiment-btn .emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.sentiment-btn .text {
    font-weight: 600;
    font-size: 1rem;
}

#positive:checked + .sentiment-btn {
    border-color: var(--positive);
    background: var(--positive);
    color: var(--white);
}

#negative:checked + .sentiment-btn {
    border-color: var(--negative);
    background: var(--negative);
    color: var(--white);
}

/* ============================================
   Textarea
   ============================================ */

.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(222, 88, 51, 0.1);
}

.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* ============================================
   Submit Button
   ============================================ */

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 88, 51, 0.3);
}

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

/* ============================================
   Alerts & Errors
   ============================================ */

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #ffebee;
    border: 2px solid var(--negative);
    color: #c62828;
}

.form-error {
    display: none;
    color: var(--negative);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ============================================
   Privacy Note
   ============================================ */

.privacy-note {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--white);
    opacity: 0.9;
}

/* ============================================
   Thank You Page
   ============================================ */

.thanks-container {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px var(--shadow);
    text-align: center;
}

.thanks-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: celebrate 1s ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}

.thanks-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.thanks-message {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.thanks-duck {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.ascii-duck {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.duck-speech {
    font-style: italic;
    color: var(--text-light);
}

.thanks-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 480px) {
    .thanks-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 88, 51, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }

    .sentiment-btn {
        padding: 1rem 0.5rem;
        min-height: 100px;
    }

    .sentiment-btn .emoji {
        font-size: 2rem;
    }

    .feedback-form {
        padding: 1.5rem;
    }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.sentiment-btn:focus-within {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

