/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e40af;
    --secondary-color: #059669;
    --accent-color: #06b6d4;
    --background: #ffffff;
    --background-alt: #f1f3f4;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #059669 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-alt {
    background-color: var(--background-alt);
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Steps */
.steps {
    max-width: 800px;
    margin: 2rem auto;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.step-content p {
    color: var(--text-secondary);
}

/* GPT Access */
.gpt-access {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.gpt-access .note {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0.25rem;
    text-align: left;
}

.gpt-access .small-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Best Practices */
.best-practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.practice {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.practice h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.practice ul {
    list-style-position: inside;
    color: var(--text-secondary);
}

.practice li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Resources */
.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.resource-link {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.resource-link:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.resource-link h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.resource-link p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Contact Section */
.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

#contact p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 1rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background-color: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }

    .best-practices-grid,
    .resources-list {
        grid-template-columns: 1fr;
    }

    .cta-buttons,
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Accessibility */
a:focus,
button:focus,
.btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Interactive Tool Styles */
.tool-container {
    background: var(--background-alt);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.tool-container h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-label {
    display: block;
    cursor: pointer;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--background);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #e0f2fe;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 123, 191, 0.15);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Image Preview */
.image-preview {
    margin-top: 1rem;
}

.preview-card {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.preview-filename {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Context Section */
.context-section {
    margin-bottom: 2rem;
}

.context-section > label,
.context-file-heading {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.context-inputs {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1rem;
    align-items: start;
}

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

.context-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.context-file-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.context-file-label {
    cursor: pointer;
    display: block;
}

.context-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: var(--background);
}

.context-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.context-upload-area.drag-over {
    border-color: var(--primary-color);
    background: #e0f2fe;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 123, 191, 0.15);
}

.context-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.context-upload-area p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.context-upload-note {
    color: var(--text-secondary);
    font-size: 0.8rem !important;
}

.context-upload-hint {
    color: #6c5ce7;
    font-size: 0.75rem !important;
    font-style: italic;
    margin-top: 0.25rem !important;
}

.context-file-progress {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.context-file-progress .progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: var(--border-color);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.context-file-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    animation: contextProgress 2s ease-in-out infinite;
}

.context-file-progress .progress-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

@keyframes contextProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.context-file-preview {
    padding: 0.75rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.context-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.context-file-name {
    font-weight: 500;
    color: var(--text-primary);
}

.context-file-size {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.context-file-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

.context-file-remove:hover {
    background: #c82333;
}

.context-file-content {
    max-height: 100px;
    overflow-y: auto;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-family: monospace;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #666;
}

/* Reference Documents Section */
.reference-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9ff;
    border-radius: 8px;
    border: 1px solid #e3e6ff;
}

.reference-section > label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.reference-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.reference-inputs {
    display: flex;
    flex-direction: column;
}

.reference-file-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reference-file-label {
    cursor: pointer;
    display: block;
}

.reference-upload-area {
    border: 2px dashed #6c5ce7;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: white;
}

.reference-upload-area:hover {
    border-color: #5a4fcf;
    background-color: rgba(108, 92, 231, 0.05);
}

.reference-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.reference-upload-area p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.reference-upload-note {
    color: var(--text-secondary);
    font-size: 0.8rem !important;
}

.reference-upload-hint {
    color: #6c5ce7;
    font-size: 0.75rem !important;
    font-style: italic;
    margin-top: 0.25rem !important;
}

.reference-files-preview {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
}

.reference-file-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.reference-file-item:last-child {
    border-bottom: none;
}

.reference-file-info {
    flex: 1;
}

.reference-file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.reference-file-size {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.reference-file-content {
    margin-top: 0.5rem;
    max-height: 60px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #666;
}

.reference-file-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
}

.reference-file-remove:hover {
    background: #c82333;
}

.reference-permanent-hint {
    background: #e8f4fd;
    border: 1px solid #b3d7f0;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.reference-permanent-hint p {
    margin: 0;
    font-size: 0.85rem;
    color: #2c5aa0;
}

/* Generate Section */
.generate-section {
    text-align: center;
    margin-bottom: 2rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Error Container */
.error-container {
    margin: 1rem 0;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
}

/* Results Container */
.results-container {
    margin-top: 2rem;
}

.results {
    background: var(--background);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.results h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.result-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-section h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.1rem;
}

.character-count {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.char-count-valid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.char-count-invalid {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.text-too-long {
    border-left: 3px solid #dc3545;
    padding-left: 1rem;
    background-color: #fff5f5;
}

.result-content {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.result-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.copy-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

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

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.transcribed-text {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 1.4;
    color: #212529;
}

/* Dark mode override for transcribed text - keep readable */
body.dark-mode .transcribed-text {
    background-color: #ffffff;
    border-color: #dee2e6;
    color: #212529;
}

/* Responsive adjustments for tool */
@media (max-width: 768px) {
    .tool-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .context-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .context-upload-area {
        padding: 1.5rem 1rem;
    }
    
    .context-upload-icon {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .character-count {
        align-self: flex-end;
        font-size: 0.8rem;
    }
    
    .reference-section {
        padding: 1rem;
    }
    
    .reference-upload-area {
        padding: 1.5rem 1rem;
    }
    
    .reference-upload-icon {
        font-size: 2rem;
    }
    
    .reference-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .reference-file-remove {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Enhanced Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Dark Mode Styles */
body.dark-mode {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #06b6d4;
    --background: #0f172a;
    --background-alt: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
}

.dark-mode .hero {
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
}

body.dark-mode .upload-area.drag-over {
    background: #1e3a5f;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

body.dark-mode .context-upload-area.drag-over {
    background: #1e3a5f;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

/* Header Controls */
.header-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.dark-mode-toggle {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

body.dark-mode .dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Enhanced Loading Styles */
.enhanced-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-progress {
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: var(--border-color);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    animation: progress 3s ease-in-out infinite;
}

.loading-message {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

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

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Enhanced Copy Buttons */
.copy-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

/* Success Toast */
.success-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--secondary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.success-toast.show {
    transform: translateX(0);
    animation: success-pulse 0.5s ease;
}

@keyframes success-pulse {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Results Animation */
.results {
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Result Sections */
.result-section {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.result-section:nth-child(1) { animation-delay: 0.1s; }
.result-section:nth-child(2) { animation-delay: 0.2s; }
.result-section:nth-child(3) { animation-delay: 0.3s; }
.result-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Typography Hierarchy */
h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Enhanced Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Focus States for Accessibility */
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mobile Dark Mode Adjustments */
@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .success-toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .success-toast.show {
        transform: translateY(0);
    }
}
