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

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

.container {
    width: 100%;
    max-width: 700px;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

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

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1em;
}

h2 {
    color: #444;
    font-size: 1.2em;
    margin-bottom: 10px;
    margin-top: 20px;
}

h2:first-of-type {
    margin-top: 0;
}

.input-section,
.output-section {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background-color: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background-color: #63408b;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(118, 75, 162, 0.4);
}

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

.btn-danger {
    background-color: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background-color: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 107, 107, 0.4);
}

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

.btn-copy {
    width: 100%;
    background-color: #51cf66;
    color: white;
    margin-top: 10px;
}

.btn-copy:hover {
    background-color: #40c057;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(81, 207, 102, 0.4);
}

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

.notification {
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-weight: 600;
    display: none;
    animation: slideDown 0.3s ease-out;
}

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

.notification.show {
    display: block;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 600px) {
    .card {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        min-width: unset;
    }

    textarea {
        font-size: 16px;
    }
}
