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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-left: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
}

/* Header Styles */
.header {
    background: #000;
    padding: 0;
    text-align: center;
    color: white;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.header::before {
    display: none;
}

.logo-section {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
}

.lab-logo {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}



/* Main Content */
.main-content {
    padding: 30px 20px;
}

.card {
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    border: none;
}

.card-header {
    background: white;
    padding: 25px;
    text-align: center;
    color: #000;
    border-bottom: 2px solid #000;
}

.card-header h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.card-header h1 i {
    font-size: 26px;
}

.card-header p {
    opacity: 0.8;
    font-size: 14px;
    font-weight: 300;
}

/* Form Styles */
.form {
    padding: 30px 25px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: #000;
    width: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #666;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.crab-options-container {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 360px) {
    .crab-options-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.crab-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 2px solid #000;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.crab-option input {
    accent-color: #000;
    width: 18px;
    height: 18px;
}

.crab-option:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.crab-option.selected {
    border-color: #27ae60;
    background: #e9f9f0;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.crab-option input:checked + span {
    color: #000;
    font-weight: 600;
}

.crab-recommendation {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f4fdf7;
    border-left: 3px solid #27ae60;
    color: #1d8348;
    font-size: 13px;
    line-height: 1.5;
    display: none;
}

.crab-recommendation.active {
    display: block;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: #000;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.submit-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

/* Footer */
.footer {
    background: #000;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    line-height: 1.5;
}

.footer p:first-child {
    font-weight: 500;
    margin-bottom: 5px;
}

.footer p:last-child {
    opacity: 0.8;
    font-weight: 300;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 0;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    border: 2px solid #000;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #000;
    padding: 25px;
    text-align: center;
    color: white;
}

.modal-header i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 500;
}

.modal-body {
    padding: 25px;
    text-align: center;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 10px;
    color: #2c3e50;
}

.modal-btn {
    width: 100%;
    padding: 15px;
    background: #000;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 大闸蟹图片样式 */
.crab-image-section {
    text-align: center;
    padding: 0;
    background: white;
    width: 100%;
    overflow: hidden;
}

.crab-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    margin-bottom: 0;
}

.crab-tips {
    background: #f8f9fa;
    padding: 20px;
    margin: 0;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    text-align: center;
}

.crab-tips h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.crab-tips p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    font-weight: 500;
}

/* 输入验证状态修改 */
.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        margin: 0;
        border-radius: 0;
    }
    
    .form {
        padding: 20px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .header {
        padding: 25px 20px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .card-header h1 {
        font-size: 20px;
    }
}

/* 输入验证状态修改 */
.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Animations */
.card {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeInUp 0.6s ease;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

.form-group:nth-child(1) { --delay: 1; }
.form-group:nth-child(2) { --delay: 2; }
.form-group:nth-child(3) { --delay: 3; }
.form-group:nth-child(4) { --delay: 4; }
.form-group:nth-child(5) { --delay: 5; }


.rainbow-text {
    font-weight: bold;
    background: linear-gradient(45deg, 
        #ff0000,  /* 红 */
        #ff7700,  /* 橙 */
        #ffdd00,  /* 黄 */
        #00ff00,  /* 绿 */
        #0088ff,  /* 蓝 */
        #6600ff,  /* 靛 */
        #8800ff   /* 紫 */
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 3s ease-in-out infinite;
}

@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bold {
    font-weight: bold;
    font-size: 1.2em;
}