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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    color: #60a5fa;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(96, 165, 250, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.back-button:hover {
    background: linear-gradient(145deg, #16213e 0%, #1a1a2e 100%);
    border-color: #60a5fa;
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.3);
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(59, 130, 246, 0.1);
}

h1 {
    text-align: center;
    color: #60a5fa;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

.converter-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    color: #93c5fd;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.char-counter {
    color: #60a5fa;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 15px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.char-counter.warning {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
}

.char-counter.error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.1);
}

textarea {
    width: 100%;
    height: 300px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 20px;
    color: #e2e8f0;
    font-size: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

textarea::placeholder {
    color: #475569;
}

textarea:read-only {
    cursor: default;
}

@media (max-width: 768px) {
    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .converter-wrapper {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 25px;
    }
    
    textarea {
        height: 200px;
    }
}