/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Navigation Bar */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #FFB300;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    max-width: 820px;
    flex: 1.6;
    padding-left: 4rem;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.8rem;
    line-height: 2;
    letter-spacing: 0.3px;
    font-weight: 300;
}

.hero-description {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 2.5rem;
    line-height: 2;
    letter-spacing: 0.3px;
    font-weight: 300;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.cta-button:hover {
    background-color: white;
    color: #1a1a1a;
}

.arrow-icon {
    font-size: 1.5rem;
}

.hero-image {
    flex: 0.4;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 2rem;
}

.bee-illustration {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 12px 35px rgba(255, 179, 0, 0.2));
}

/* Demo Section */
.demo-section {
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
    background-color: #f5f5f5;
}

.demo-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Usage Guide */
.usage-guide {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.guide-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.guide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
    border-top: 4px solid #FFB300;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.guide-number {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFB300 0%, #FFA000 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.4);
}

.guide-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    letter-spacing: 0.3px;
}

.guide-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    font-weight: 400;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.tab-btn {
    padding: 0.8rem 2rem;
    background-color: #e0e0e0;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover {
    background-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tab-btn.active {
    background-color: #FFB300;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 179, 0, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-section {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: center;
}

.input-box {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.input-box:focus {
    outline: none;
    border-color: #FFB300;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.2);
}

.file-input {
    display: none;
}

.file-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: white;
}

.file-label:hover {
    border-color: #FFB300;
}

.upload-btn {
    padding: 1.1rem 2.8rem;
    background: linear-gradient(135deg, #FFB300 0%, #FFA000 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(255, 179, 0, 0.35);
    letter-spacing: 0.5px;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #FFA000 0%, #FF8F00 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 179, 0, 0.5);
}

.upload-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255, 179, 0, 0.4);
}

.result-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.result-box {
    background-color: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.result-box:hover {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.result-box h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 3px solid #FFB300;
    padding-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.display-area {
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #ffffff;
}

.placeholder-text {
    color: #adb5bd;
    font-style: italic;
    font-size: 1rem;
    text-align: center;
}

.result-container-batch {
    margin-top: 2rem;
}

.result-box-full {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.result-box-full h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
    border-bottom: 2px solid #FFB300;
    padding-bottom: 0.5rem;
}

/* Prediction Results Styling */
.prediction-result {
    text-align: left;
    padding: 1rem;
}

.prediction-result .result-item {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #FFB300;
}

.prediction-result .result-label {
    font-weight: bold;
    color: #555;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.prediction-result .result-value {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: bold;
}

.result-value.toxic {
    color: #e74c3c;
}

.result-value.non-toxic {
    color: #27ae60;
}

.result-value.in-domain {
    color: #27ae60;
}

.result-value.out-domain {
    color: #e67e22;
}

.molecule-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Batch Results Table */
.batch-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.batch-table th,
.batch-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.batch-table th {
    background-color: #FFB300;
    color: white;
    font-weight: bold;
}

.batch-table tr:hover {
    background-color: #f5f5f5;
}

/* Contact Section */
.contact-section {
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
    background-color: #f5f5f5;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.info-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.info-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.info-item p {
    color: #666;
    line-height: 1.8;
}

.contact-form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: bold;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #FFB300;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #FFB300;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.3);
}

.submit-btn:hover {
    background-color: #FFA000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 179, 0, 0.4);
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content p {
    margin: 0.8rem 0;
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-content p:first-child {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-content,
    .hero-image {
        padding: 0;
    }

    .result-container,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        gap: 1rem;
    }

    .input-section {
        flex-direction: column;
    }

    .upload-btn {
        width: 100%;
    }
}




/* 预测结果显示样式优化 */
.prediction-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 1rem;
}

.prediction-result .result-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #FFB300;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.prediction-result .result-label {
    font-weight: bold;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prediction-result .result-value {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: bold;
}

/* 图像显示优化 */
.molecule-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s;
    margin-bottom: 0.5rem;
}

.molecule-img:hover {
    transform: scale(1.05);
}

/* Molecular Properties */
.mol-properties {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin-top: 1rem;
}

.prop-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.8rem 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #FFB300;
    transition: all 0.2s;
}

.prop-item:hover {
    transform: translateX(4px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.prop-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.prop-value {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 900;
    font-family: 'Arial Black', Arial, sans-serif;
    letter-spacing: 0.3px;
}

/* 结果容器布局调整 */
.result-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 1rem;
}

.result-box-full {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.result-box-full:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* 颜色样式 */
.result-value.toxic {
    color: #e74c3c;
}

.result-value.non-toxic {
    color: #27ae60;
}

.result-value.in-domain {
    color: #27ae60;
}

.result-value.out-domain {
    color: #e67e22;
}

/* 表格中的颜色样式 */
.batch-table .toxic {
    color: #e74c3c;
    font-weight: bold;
}

.batch-table .non-toxic {
    color: #27ae60;
    font-weight: bold;
}

.batch-table .in-domain {
    color: #27ae60;
}

.batch-table .out-domain {
    color: #e67e22;
}

/* Batch Actions - Download Button */
.batch-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.35);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.download-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.download-btn:active {
    transform: translateY(0px);
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.4);
}

.download-btn svg {
    flex-shrink: 0;
}

/* Global Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loading-spinner-large {
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid #FFB300;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Text Styling */
.error-text {
    color: #e74c3c;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

/* GNN Explanation with Toxicity Info */
.explanation-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.explanation-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.toxicity-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.toxicity-label {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    padding: 0.6rem 1.6rem;
    border-radius: 10px;
    font-family: 'Arial Black', Arial, sans-serif;
    transition: transform 0.2s;
}

.toxicity-label:hover {
    transform: scale(1.05);
}

.toxicity-label.toxic {
    color: #fff;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.toxicity-label.non-toxic {
    color: #fff;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.probability-value {
    font-size: 1.05rem;
    color: #495057;
    font-weight: 900;
    letter-spacing: 0.5px;
    font-family: 'Arial Black', Arial, sans-serif;
}

.prob-number {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 900;
    font-family: 'Arial Black', Arial, sans-serif;
}

/* Applicability Domain Label */
.ad-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

.ad-label.in-domain {
    color: #fff;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.ad-label.out-domain {
    color: #fff;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .result-container {
        grid-template-columns: 1fr;
    }

    .prediction-result {
        grid-template-columns: 1fr;
    }
    
    .toxicity-label {
        font-size: 1.4rem;
    }
    
    .probability-label {
        font-size: 1rem;
    }
}
