* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0d2b45 0%, #203a56 50%, #2c3e50 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: #f39c12;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: #ecf0f1;
    line-height: 1.6;
}

.tool-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-section, .output-section {
    margin-bottom: 30px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #f39c12;
    display: flex;
    align-items: center;
}

h2 i {
    margin-right: 10px;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    resize: vertical;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.3);
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

button {
    padding: 12px 25px;
    background: linear-gradient(to right, #f39c12, #e74c3c);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

button i {
    margin-right: 8px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

#clearBtn {
    background: linear-gradient(to right, #95a5a6, #7f8c8d);
}

.output-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    background: linear-gradient(to right, #2ecc71, #27ae60);
}

.output-text {
    background: rgba(0, 0, 0, 0.2);
    min-height: 150px;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.4rem;
    line-height: 1.8;
    overflow-wrap: break-word;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.explanation {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h3 {
    font-size: 1.5rem;
    margin: 20px 0 15px;
    color: #f39c12;
}

p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.unicode-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.unicode-table th, .unicode-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.unicode-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.unicode-table tr:last-child td {
    border-bottom: none;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #ecf0f1;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .description {
        font-size: 1rem;
    }
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: #2ecc71;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -70px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2ecc71 transparent transparent transparent;
}

.tooltip.show .tooltiptext {
    visibility: visible;
    opacity: 1;
}