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

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

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(255, 154, 158, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

header h1 {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

main {
    margin: 30px 0;
}

.file-section {
    margin-bottom: 40px;
}

.file-label {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ffa5a5);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-bottom: 15px;
}

.file-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.file-input {
    display: none;
}

.file-info {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.display-section {
    margin-bottom: 40px;
}

.text-display {
    background: linear-gradient(135deg, #fff5f5, #ffe6e6);
    border: 2px solid #ffcccc;
    border-radius: 15px;
    padding: 60px 40px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(255, 107, 107, 0.1);
}

#current-text {
    color: #333;
    font-size: 1.8em;
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
    transition: all 0.3s ease;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}

.control-section {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ffa5a5);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #adb5bd);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.built-in-files {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.btn-built-in {
    background: linear-gradient(135deg, #ffb6b9, #ffd9ce);
    color: #333;
    padding: 12px 25px;
    font-size: 1em;
    border: 2px solid #ffcccc;
}

.btn-built-in:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ff9a9e, #ffb6b9);
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ffeeee;
}

footer p {
    color: #999;
    font-size: 0.9em;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.text-display.show-animation {
    animation: fadeIn 0.5s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .text-display {
        padding: 40px 20px;
    }
    
    #current-text {
        font-size: 1.4em;
    }
    
    .control-section {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}