@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(100vh);
    }
    to {
        transform: translateY(0);
    }
}

:root {
    /* UnseenLight Dark Theme Colors */
    --primary-color: #7C4DFF;
    --primary-dark: #5C35CC;
    --secondary-color: #03DAC6;
    --background-dark: #121212;
    --surface-dark: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --error-color: #CF6679;
    --success-color: #03DAC6;
    --modal-background: rgba(18, 18, 18, 0.95);
    --generating-color: #ff4444;
}

/* Button states */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.btn-primary:disabled {
    background-color: var(--generating-color);
    cursor: not-allowed;
    opacity: 1;
}

.hidden {
    display: none !important;
}

.audio-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--primary-color);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.input-wrapper {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.main-content {
    background-color: var(--surface-dark);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.text-input {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.08);
}

.controls {
    margin-top: 2rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.control-input {
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(124, 77, 255, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status.success {
    color: var(--success-color);
}

.status.error {
    color: var(--error-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-background);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s ease-out;
}

.modal-content {
    background-color: var(--surface-dark);
    margin: auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.5s ease-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 0;
}

.audio-player {
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    background-color: var(--background-dark);
}

/* Page Load Animation */
.container {
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards;
}

.header {
    opacity: 0;
    animation: fadeIn 2s ease-out forwards;
}

.main-content {
    opacity: 0;
    animation: fadeIn 2.5s ease-out forwards;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
    }
    }
}

/* Focus styles */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Footer */
.site-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 2rem 0 1rem;
    padding: 0 1rem;
}

.site-footer p {
    margin: 0;
    opacity: 0.9;
}

.footer-info {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.copyright {
    font-weight: 500;
    margin-bottom: 0.5rem !important;
}

.trademark-info {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0.5rem 0 !important;
    max-width: 600px;
    margin: 0 auto !important;
    opacity: 0.7 !important;
}

.website-link {
    margin-top: 1rem !important;
}

.website-link a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.website-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}