:root {
    font-size: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    padding: 1.25rem;
}

.container {
    max-width: 75rem;
    margin: 0 auto;
}

.site-title {
    text-align: left;
    margin-bottom: 1.875rem; */
    padding: 0.9375rem 0; 
    border-bottom: 0.125rem solid #e0e6f5;
}

.site-title h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0.0625rem 0.0625rem 0.1875rem rgba(0,0,0,0.1);
    display: inline-block;
    padding-bottom: 0.3125rem;
    border-bottom: 0.25rem solid #3498db;
}

.site-title span {
    color: #e74c3c;
}

/* 控制面板 */
.control-panel {
    background-color: white;
    border-radius: 0.9375rem; 
    padding: 1.5625rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.08); 
    margin-bottom: 1.875rem;
}

.control-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.control-title i {
    margin-right: 0.625rem;
    color: #3498db;
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.control-group {
    flex: 1;
    min-width: 15.625rem; 
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #34495e;
}

.control-group input, .control-group select {
    width: 100%;
    padding: 0.75rem 0.9375rem;
    border: 0.125rem solid #e0e6f5;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border 0.3s;
}

.control-group input:focus, .control-group select:focus {
    border-color: #3498db;
    outline: none;
}

.gender-options {
    display: flex;
    gap: 0.9375rem;
    margin-top: 0.3125rem;
}

.gender-option {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    border: 0.125rem solid #e0e6f5;
}

.gender-option:hover {
    background-color: #edf2f7;
}

.gender-option.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.generate-btn {
    display: block;
    width: 100%;
    padding: 0.9375rem;
    background: linear-gradient(to right, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.625rem;
}

.generate-btn:hover {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.4375rem 0.9375rem rgba(52, 152, 219, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.results-container {
    background-color: white;
    border-radius: 0.9375rem;
    padding: 1.5625rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.08);
    margin-bottom: 1.875rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.results-title {
    font-size: 1.5rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.results-count {
    background-color: #f0f7ff;
    padding: 0.3125rem 0.9375rem;
    border-radius: 1.25rem;
    color: #3498db;
    font-weight: 600;
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 0.9375rem;
}

.name-card {
    background-color: #f8fafc;
    border-radius: 0.625rem;
    padding: 0.3rem 0.5rem 0.3rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 0.3125rem solid #3498db;
    transition: all 0.3s;
}

.name-card:hover {
    transform: translateY(-0.3125rem); 
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.05);
}

.name-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    transform: translateY(-5%);
}

.name-gender {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.3125rem;
}

.copy-btn {
    background-color: #f8fafc;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background-color: #3498db;
    color: white;
}

.appreciation {
    background-color: white;
    border-radius: 0.9375rem;
    padding: 1.5625rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.08);
    text-align: center;
}

.appreciation-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appreciation-text {
    color: #7f8c8d;
    margin-bottom: 1.5625rem;
    max-width: 37.5rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.donation-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9375rem;
    margin-bottom: 1.5625rem;
}

.donation-option {
    position: relative;
}

.donation-option input[type="radio"] {
    display: none;
}

.donation-option label {
    display: block;
    padding: 0.9375rem 1.5625rem;
    background-color: #f8f9fa;
    border: 0.125rem solid #e0e6f5;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #2c3e50;
    min-width: 6.25rem;
    text-align: center;
}

.donation-option label:hover {
    background-color: #edf2f7;
    border-color: #3498db;
}

.donation-option input[type="radio"]:checked + label {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.custom-amount {
    margin-top: 1.25rem;
}

.custom-amount-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.custom-amount-input span {
    font-weight: 600;
    color: #2c3e50;
}

.custom-amount-input input {
    width: 9.375rem;
    padding: 0.625rem 0.9375rem;
    border: 0.125rem solid #e0e6f5;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border 0.3s;
}

.custom-amount-input input:focus {
    border-color: #3498db;
    outline: none;
}

.confirm-btn {
    display: inline-block;
    padding: 0.75rem 1.875rem;
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.25rem;
}

.confirm-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.3125rem 0.9375rem rgba(46, 204, 113, 0.3);
}

.confirm-btn:active {
    transform: translateY(0);
}

.donation-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.875rem;
    margin-top: 1.875rem;
    padding-top: 1.875rem;
    border-top: 0.0625rem solid #e0e6f5;
}

.donation-method {
    width: 9.375rem;
    padding: 1.25rem;
    border-radius: 0.625rem;
    background-color: #f8f9fa;
    transition: all 0.3s;
}

.donation-method:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.1);
}

.donation-icon {
    width: 3.125rem;
    height: 3.125rem;
    margin: 0 auto 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alipay-icon {
    color: #1296db;
}

.wechat-icon {
    color: #07c160;
}

.coffee-icon {
    color: #f4b459;
}

.donation-method p {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 0.3125rem;
}

.copyright {
    text-align: center;
    margin-top: 1.875rem;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding-top: 1.25rem;
    border-top: 0.0625rem solid #e0e6f5;
}

@media (max-width: 48rem) {
    .site-title h1 {
        font-size: 2.2rem;
    }
    
    .names-grid {
        grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
    }
    
    .donation-options {
        gap: 0.625rem;
    }
    
    .donation-option label {
        min-width: 5rem;
        padding: 0.75rem 0.9375rem;
    }
    
    .donation-methods {
        gap: 0.9375rem;
    }
    
    .donation-method {
        width: 8.125rem;
    }
}

@media (max-width: 30rem) {
    .site-title h1 {
        font-size: 1.8rem;
    }
    
    .control-panel, .results-container, .appreciation {
        padding: 1.25rem;
    }
    
    .names-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .donation-options {
        flex-direction: column;
        align-items: center;
    }
    
    .donation-option {
        width: 100%;
    }
    
    .donation-option label {
        width: 100%;
    }
    
    .donation-methods {
        flex-direction: column;
        align-items: center;
    }
    
    .donation-method {
        width: 12.5rem;
    }
}

.copy-notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background-color: #2ecc71;
    color: white;
    padding: 0.9375rem 1.5625rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
}

.donation-notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background-color: #3498db;
    color: white;
    padding: 0.9375rem 1.5625rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-1.25rem); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-1.25rem); }
}