:root {
    --primary-color: #3a7d5f;
    --secondary-color: #8ac6b3;
    --accent-color: #d4af37;
    --dark-color: #1e3f2d;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' width='100' height='100'%3E%3Cpath fill='rgba(255,255,255,0.1)' d='M50,0 L100,50 L50,100 L0,50 Z'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.1;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
}

header p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
}

main {
    padding: 2.5rem 0;
}

section {
    background: white;
    border-radius: 12px;
    padding: 2.2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(58, 125, 95, 0.1);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.8rem;
    font-size: 2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

h3 {
    color: var(--dark-color);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
}

h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.8rem;
    font-size: 1.2rem;
}

.input-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"], select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e5ee;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background-color: #f8fff9;
}

input[type="text"]:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(58, 125, 95, 0.2);
    outline: none;
    background-color: white;
}

button {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#generateBtn {
    width: 100%;
    font-size: 1.2rem;
    padding: 16px;
    margin-top: 0.5rem;
}

.results-section {
    margin-top: 2.2rem;
}

.name-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 12px;
    background-color: #f8fff9;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.name-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #f0faf0;
}

.copy-btn {
    background: var(--gray-color);
    padding: 8px 14px;
    font-size: 0.95rem;
}

.copy-btn.copied {
    background: var(--success-color);
}

.history-section ul {
    list-style: none;
}

.history-section li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.history-section li:hover {
    background-color: #f8fff9;
}

.history-name {
    font-weight: 500;
    color: var(--dark-color);
}

.history-type {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-style: italic;
}

.content-section, .faq-section {
    line-height: 1.8;
}

.content-section h3 {
    margin-top: 2rem;
    color: var(--primary-color);
    border-bottom: 1px solid #e8f5e9;
    padding-bottom: 0.5rem;
}

.content-section ul, .content-section ol {
    margin-left: 1.8rem;
    margin-bottom: 1.8rem;
}

.content-section li {
    margin-bottom: 0.7rem;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8f5e9;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.hidden {
    display: none;
}

.error-message {
    background: #ffecec;
    color: #d86161;
    padding: 14px;
    border-radius: 10px;
    border-left: 5px solid #d86161;
    margin-top: 1.2rem;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 1.8rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    .name-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .copy-btn {
        margin-top: 12px;
        align-self: flex-end;
    }
    
    .history-section li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-section .copy-btn {
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.9rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    section {
        padding: 1.5rem;
    }
}