* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.container {
    max-width: 850px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.language-selector {
    text-align: right;
    margin-bottom: 20px;
}
.language-selector select {
    padding: 8px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}
.language-selector select:focus {
    border-color: #667eea;
    outline: none;
}
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.input-group {
    margin-bottom: 28px;
    position: relative;
}
label {
    display: block;
    margin-bottom: 12px;
    color: #34495e;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
}
label::before {
    content: "•";
    color: #667eea;
    margin-right: 8px;
    font-size: 20px;
}
.input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
input, textarea {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}
input:focus, textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}
textarea {
    resize: none;
    height: 120px;
    line-height: 1.6;
}
button {
    padding: 15px 24px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}
button:hover::after {
    width: 300px;
    height: 300px;
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
button:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.btn-paste {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}
.btn-generate {
    background: linear-gradient(90deg, #3498db, #2980b9);
}
.btn-copy {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}
.btn-encrypt {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    width: 140px;
}
.btn-decrypt {
    background: linear-gradient(90deg, #f39c12, #d35400);
    width: 140px;
}
.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}
.result-group {
    margin-top: 35px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.copy-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
}
.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    button {
        width: 100%;
        padding: 14px;
    }
    .btn-group {
        flex-direction: column;
    }
    .btn-encrypt, .btn-decrypt {
        width: 100%;
    }
}
