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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 8px;
}

nav a:hover {
    color: #667eea;
    background: rgba(102,126,234,0.1);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
}

.hero {
    padding: 60px 0;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.type-switcher {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 15px 30px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    display: inline-flex;
}

.type-switcher select {
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    background: #fff;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
    background: rgba(255,255,255,0.15);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.control-group select,
.control-group input[type="number"] {
    padding: 10px 15px;
    border-radius: 12px;
    border: none;
    background: #fff;
    color: #333;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.control-group input[type="range"] {
    width: 100%;
    accent-color: #764ba2;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.actions button {
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.6);
}

.actions button:active {
    transform: translateY(0);
}

.result-area {
    background: #fff;
    border-radius: 30px 30px 0 0;
    padding: 40px 0;
    margin-top: -30px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

#result, #batchResult, #inspiration {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 100px;
    border: 1px solid #e9ecef;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.result-actions button {
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.history, .favorites, .random-examples {
    background: #fff;
    padding: 40px 0;
}

.history h2, .favorites h2, .random-examples h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#historyList, #favoritesList {
    display: grid;
    gap: 15px;
}

.history-item, .favorite-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item .content, .favorite-item .content {
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 150px;
    overflow-y: auto;
}

.history-item .actions, .favorite-item .actions {
    display: flex;
    gap: 10px;
}

.history-item button, .favorite-item button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.history-item button:hover, .favorite-item button:hover {
    transform: translateY(-2px);
}

#randomExamples {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    min-height: 80px;
}

.random-examples button {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.random-examples button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

footer {
    background: #2d3436;
    color: #dfe6e9;
    padding: 30px 0;
    text-align: center;
}

footer a {
    color: #74b9ff;
    text-decoration: none;
    margin: 0 10px;
}

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

.admin-section {
    background: #fff;
    padding: 60px 0;
    min-height: 80vh;
}

.admin-form {
    max-width: 500px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #667eea;
}

.admin-form button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.error {
    color: #e74c3c;
    background: #fde8e8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success {
    color: #27ae60;
    background: #d4edda;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(255,255,255,0.98);
        padding: 15px;
        border-radius: 12px;
        margin-top: 10px;
    }

    nav.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .controls {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .type-switcher {
        flex-direction: column;
        padding: 15px;
        border-radius: 20px;
    }

    .actions {
        flex-direction: column;
        align-items: center;
    }

    .actions button {
        width: 100%;
        max-width: 300px;
    }

    .history-item, .favorite-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 内页通用样式 */
.page-content {
    background: #fff;
    padding: 60px 0;
    min-height: 80vh;
}

.page-content h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.page-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.page-content li {
    margin-bottom: 10px;
    color: #555;
}