* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: #6a11cb;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border-radius: 12px;
    border: none;
    resize: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
}

textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.record-btn {
    background: rgba(255, 0, 127, 0.2);
    border: 2px solid #ff007f;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.record-btn:hover {
    background: #ff007f;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.6);
}

.record-btn.recording {
    background: #ff007f;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 127, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 0, 127, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 127, 0); }
}

.translate-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #ff007f;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 0, 127, 0.4);
    margin-bottom: 20px;
}

.translate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 0, 127, 0.6);
}

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

.output-section {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    min-height: 100px;
}

.output-box {
    font-size: 1.1rem;
    line-height: 1.5;
    word-break: break-word;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    opacity: 0.6;
}