:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --gradient-1: #3b82f6;
    --gradient-2: #8b5cf6;
    --highlight-color: #fbbf24;
    --radius: 16px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --blur: blur(12px);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Effects */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--gradient-2) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--gradient-1) 0%, transparent 70%);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(2rem + env(safe-area-inset-top)) 1.5rem calc(2rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.accent-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 1s ease-out;
}

.lang-selector {
    display: flex;
    width: 100%;
}

select {
    width: 100%;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.1rem;
    outline: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 3rem;
}

select option {
    background: #0f172a;
    color: #ffffff;
}

.input-wrapper {
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
}

textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
    outline: none;
}

textarea::placeholder {
    color: #475569;
}

/* Button */
.primary-btn {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 1.2rem 2rem;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
    min-height: 56px; /* standard minimum touch target size */
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.5);
}

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

/* Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.primary-btn.loading .btn-text {
    display: none;
}

.primary-btn.loading .loader {
    display: block;
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-section.hidden {
    display: none;
}

.result-card {
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.result-card:nth-child(2) {
    animation-delay: 0.2s;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.flag {
    font-size: 1.5rem;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.original-text p {
    font-size: 1.1rem;
    line-height: 1.5;
}

.easy-text p {
    font-size: 1.4rem;
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.5;
}

.hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.highlight-consonant {
    color: var(--highlight-color);
    font-weight: 700;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .app-header h1 {
        font-size: 2rem;
    }
    .easy-text p {
        font-size: 1.2rem;
    }
}
