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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main form section */
.problem-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
}

.problem-form h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 600;
}

.instructions {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Form styles */
.form-group {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 140px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: white;
}

textarea::placeholder {
    color: #95a5a6;
    font-style: italic;
}

.char-count {
    text-align: right;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 8px;
    font-weight: 500;
}

.char-count.warning {
    color: #f39c12;
}

.char-count.error {
    color: #e74c3c;
}

/* File upload styles */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 3px dashed #bdc3c7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 80px;
}

.file-label:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(-2px);
}

.file-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.file-text {
    color: #7f8c8d;
    font-weight: 600;
    font-size: 1.1rem;
}

.file-info {
    margin-top: 15px;
    padding: 15px;
    background-color: #e8f5e8;
    border-radius: 8px;
    color: #27ae60;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    border-left: 4px solid #27ae60;
}

.file-info.error {
    background-color: #ffeaea;
    color: #e74c3c;
    border-left-color: #e74c3c;
}

.help-text {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 8px;
    display: block;
    font-style: italic;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

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

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

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

/* Success and error messages */
.success-message, .error-message {
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: center;
}

.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #27ae60;
    color: #155724;
}

.success-message h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-message {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 2px solid #e74c3c;
    color: #721c24;
}

.error-message h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.submission-id {
    font-family: 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: bold;
    word-break: break-all;
}

.submit-another-btn, .try-again-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.submit-another-btn:hover, .try-again-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
}

/* Info sections */
.info-section, .examples-section {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.info-section h3, .examples-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 600;
}

.help-grid, .examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.help-item, .example-item {
    text-align: center;
    padding: 25px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transition: transform 0.3s ease;
}

.help-item:hover, .example-item:hover {
    transform: translateY(-5px);
}

.help-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.help-item h4, .example-item h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.help-item p, .example-item p {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: white;
    opacity: 0.9;
}

footer p {
    margin-bottom: 5px;
}

.privacy-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .problem-form, .info-section, .examples-section {
        padding: 25px;
    }
    
    .problem-form h2 {
        font-size: 1.6rem;
    }
    
    .help-grid, .examples-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    textarea {
        min-height: 120px;
        padding: 15px;
    }
    
    .submit-btn {
        padding: 18px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .problem-form, .info-section, .examples-section {
        padding: 20px;
    }
    
    .problem-form h2 {
        font-size: 1.4rem;
    }
    
    .instructions {
        font-size: 1rem;
    }
    
    .file-label {
        padding: 15px;
        min-height: 60px;
    }
    
    .file-icon {
        font-size: 1.5rem;
        margin-right: 10px;
    }
    
    .file-text {
        font-size: 1rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.submit-btn:focus,
textarea:focus,
.file-label:focus-within {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Legal pages styles */
.legal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.legal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #5a67d8;
}

.legal-links a {
    color: #7f8c8d;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #667eea;
}

.legal-content h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.legal-content h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.legal-content h3 {
    color: #34495e;
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 25px;
}

.legal-content li {
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}

.legal-content li ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

.legal-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.legal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e1e8ed;
    text-align: center;
}

.legal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.legal-footer a:hover {
    color: #5a67d8;
}

/* Input field styles for email */
input[type="email"] {
    width: 100%;
    padding: 18px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: white;
}

input[type="email"]::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .problem-form, .info-section, .examples-section, .legal-content {
        border: 2px solid #000;
    }
    
    textarea, input[type="email"] {
        border-color: #000;
    }
    
    .submit-btn {
        background: #000;
        border: 2px solid #fff;
    }
}