body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.header {
    width: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 25px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-content {
    width: 100%;
    max-width: 900px;
    padding: 30px 20px;
    box-sizing: border-box;
    flex: 1;
    position: relative;
    z-index: 2;
}

.footer {
    width: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.footer p {
    margin: 0;
    font-size: 16px;
    font-style: italic;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.container {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.input-section {
    margin-bottom: 35px;
    animation: fadeInUp 0.6s ease-out;
}

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

label {
    display: block;
    margin-bottom: 15px;
    color: #4a5568;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

textarea {
    width: 100%;
    min-height: 160px;
    padding: 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

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

.button-container {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3);
}

.results {
    margin-top: 25px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.result-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 0 2px 2px 0;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.result-item:nth-child(even) {
    background: rgba(248, 250, 252, 0.8);
}

.phrase-number {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.highlighted-text {
    font-size: 16px;
    line-height: 1.5;
}

.cyrillic-char {
    color: #e53e3e;
    font-weight: 700;
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    padding: 3px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.2);
    border: 1px solid rgba(229, 62, 62, 0.3);
    animation: pulse 2s infinite;
}

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

.status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 3px;
    font-weight: bold;
}

.status.error {
    background: linear-gradient(135deg, #fed7d7, #fbb6ce);
    color: #742a2a;
    border: 1px solid rgba(229, 62, 62, 0.3);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15);
}

.no-results {
    text-align: center;
    color: #4a5568;
    font-size: 18px;
    margin-top: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.clear-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    margin-left: 15px;
}

.clear-button:hover {
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .header h1 {
        font-size: 22px;
        padding: 0 20px;
        letter-spacing: 1px;
    }

    .main-content {
        padding: 20px 15px;
    }

    .container {
        padding: 25px;
        border-radius: 15px;
    }

    button {
        padding: 14px 24px;
        font-size: 15px;
        margin: 8px;
        border-radius: 25px;
    }

    .clear-button {
        margin-left: 0;
        margin-top: 15px;
    }

    .button-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    textarea {
        min-height: 140px;
        font-size: 16px;
        padding: 18px;
    }

    .result-item {
        padding: 18px;
        border-radius: 12px;
    }

    .no-results {
        font-size: 16px;
        padding: 25px;
    }

    .footer {
        padding: 18px 0;
    }

    .footer p {
        font-size: 14px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 0;
    }

    .header h1 {
        font-size: 20px;
        letter-spacing: 0.5px;
    }

    .main-content {
        padding: 15px 10px;
    }

    .container {
        padding: 20px;
        border-radius: 12px;
    }

    .input-section {
        margin-bottom: 25px;
    }

    .button-container {
        margin-bottom: 25px;
    }

    button {
        width: 100%;
        max-width: 280px;
        padding: 16px;
        font-size: 14px;
    }

    textarea {
        padding: 16px;
        min-height: 120px;
    }

    .result-item {
        padding: 15px;
        margin-bottom: 15px;
    }

    .footer {
        padding: 15px 0;
    }

    .footer p {
        font-size: 13px;
        padding: 0 15px;
    }

    label {
        font-size: 15px;
    }
}