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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 20px 0;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.generator-container {
    text-align: center;
    margin: 10px 0;
}

#generateBtn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generateBtn:hover {
    background-color: #2980b9;
}

#result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: #f9f9f9;
}

#animalImage {
    position: relative;
    min-height: 200px;
    max-width: 300px;
    margin: 0 auto;
    background-color: #f5f5f5;
    border-radius: 10px;
}

#animalImage img {
    width: 100%;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in;
    cursor: zoom-in;
}

#animalImage img.loaded {
    opacity: 1;
}

#animalFacts {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1 a {
    color: inherit;
    text-decoration: none;
}

h1 a:hover {
    text-decoration: underline;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, 
        #f0f0f0 25%, 
        #e0e0e0 50%, 
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 10px;
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
}

.error-message {
    padding: 20px;
    text-align: center;
    background-color: #fff3f3;
    border-radius: 10px;
    color: #d32f2f;
}

.error-message p {
    margin: 0;
    font-size: 16px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #bbb;
} 