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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    color: #666;
}

.name-generator {
    background: white;
    border-radius: 12px;
    padding: 40px 40px 50px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.result-box {
    text-align: center;
    margin-bottom: 40px;
    padding: 50px 40px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    color: #333;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 12px 12px 0 0;
}

.result-box h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.result-box p {
    font-size: 1rem;
    color: #6c757d;
}

.controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.generate-button, .copy-button, .share-button {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.generate-button::before, .copy-button::before, .share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.generate-button:hover::before, .copy-button:hover::before, .share-button:hover::before {
    left: 100%;
}

.generate-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.generate-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.copy-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.copy-button:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #1ca085 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.share-button {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
}

.share-button:hover {
    background: linear-gradient(135deg, #5a32a3 0%, #d63384 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-image-container {
    margin-bottom: 30px;
    text-align: center;
}

.share-image-container h3 {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.share-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#share-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.download-image-button, .copy-image-button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-image-button::before, .copy-image-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.download-image-button:hover::before, .copy-image-button:hover::before {
    left: 100%;
}

.download-image-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.download-image-button:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #1ca085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.copy-image-button {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.copy-image-button:hover {
    background: linear-gradient(135deg, #138496 0%, #5a32a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.history {
    border-top: 1px solid #e9ecef;
    padding-top: 30px;
    margin-top: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.history h3 {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.clear-button {
    padding: 10px 20px;
    border: 2px solid #dc3545;
    border-radius: 25px;
    background: white;
    color: #dc3545;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.clear-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.clear-button:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.clear-button:hover::before {
    left: 100%;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
}

.history-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.history-item:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #007bff;
    border-radius: 1.5px 0 0 1.5px;
}

.history-item .name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
    font-size: 1rem;
}

.history-item .time {
    font-size: 0.8rem;
    color: #6c757d;
}

footer {
    text-align: center;
    color: #666;
    margin-top: 30px;
    padding: 20px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.copyright {
    margin: 0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.footer-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #007bff;
}

.footer-divider {
    color: #ccc;
}



/* 简单的淡入效果 */
.result-box {
    transition: opacity 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .name-generator {
        padding: 25px 25px 35px 25px;
    }
    
    .result-box h2 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .generate-button, .copy-button, .share-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    
    .generate-button .btn-text, .copy-button, .share-button {
        width: 100%;
        justify-content: center;
        text-align: center;
        display: flex;
        align-items: center;
    }
    
    .history-header {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .clear-button {
        width: 100%;
        max-width: 200px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-divider {
        display: none;
    }
}

/* 简洁的滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.history-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #999;
} 
