* {
    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;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: #4CAF50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-box:hover {
    background: #f8f9ff;
    border-color: #4CAF50;
}

.upload-box input[type="file"] {
    display: none;
}

.upload-box label {
    display: block;
    font-size: 1.2em;
    color: #667eea;
    font-weight: 600;
}

.upload-box span {
    display: block;
    margin-top: 10px;
    color: #888;
    font-size: 0.9em;
}

.orSeparator {
    margin: 30px 0;
}

.orSeparator span {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.sequence-input {
    margin-bottom: 20px;
}

#sequenceInput {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

#sequenceInput:focus {
    outline: none;
    border-color: #4CAF50;
}

.analyze-btn button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    font-weight: 600;
}

.analyze-btn button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.analyze-btn button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.loading {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.results-section {
    display: none;
    background: #f5f5f5;
    padding: 30px;
    border-radius: 15px;
}

.results-section h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
    text-align: center;
}

.results-section.error {
    background: #ffebee;
    border: 2px solid #f44336;
}

.results-section.error h2 {
    color: #c62828;
}

.overall-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card.safe {
    border-left: 5px solid #4CAF50;
}

.summary-card.conditional {
    border-left: 5px solid #FF9800;
}

.summary-card.unsafe {
    border-left: 5px solid #F44336;
}

.summary-card.total {
    border-left: 5px solid #667eea;
}

.summary-card h3 {
    margin-bottom: 10px;
    font-size: 1em;
    color: #666;
}

.summary-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
}

.intersection-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.intersection-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.venn-chart {
    text-align: center;
}

#vennDiagram {
    max-width: 100%;
}

.venn-caption {
    margin-top: 10px;
    color: #888;
    font-size: 0.9em;
}

.tools-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tools-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    color: white;
    text-align: center;
    transition: transform 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-card h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tool-card .status {
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 5px;
    margin-top: 10px;
    display: inline-block;
}

.tool-card .status.safe {
    background: #4CAF50;
}

.tool-card .status.unsafe {
    background: #F44336;
}

.tool-card .status.conditionally {
    background: #FF9800;
}

.peptide-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.peptide-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.peptide-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 15px;
}

.peptide-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4CAF50;
    transition: transform 0.3s;
}

.peptide-card:hover {
    transform: translateX(5px);
}

.peptide-card.conditionally {
    border-left-color: #FF9800;
}

.peptide-card.unsafe {
    border-left-color: #F44336;
}

.peptide-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.peptide-card h4 .sequence {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #667eea;
}

.peptide-card .safety {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.85em;
}

.peptide-card .safety.safe {
    background: #4CAF50;
    color: white;
}

.peptide-card .safety.conditionally {
    background: #FF9800;
    color: white;
}

.peptide-card .safety.unsafe {
    background: #F44336;
    color: white;
}

.peptide-card .tools {
    margin-top: 10px;
    font-size: 0.85em;
    color: #666;
}

.peptide-card .tools ul {
    list-style: none;
    padding-left: 0;
}

.peptide-card .tools ul li {
    padding: 2px 0;
    text-align: left;
}

.peptide-card .tools ul li i {
    margin-right: 5px;
}

.download-section {
    text-align: center;
}

.download-section button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.download-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .upload-section {
        padding: 20px;
    }

    .sequence-input {
        height: 100px;
    }

    .peptide-list {
        grid-template-columns: 1fr;
    }

    .overall-summary {
        grid-template-columns: 1fr 1fr;
    }
}



* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #ffffff;
}

/* =========================
   FOOTER
   ========================= */

.safeomni-footer {
    background: linear-gradient(120deg, #596bd8 0%, #7555bf 100%);
    color: #ffffff;
    padding: 34px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 60% 40%;
    align-items: center;
}

/* =========================
   LEFT — PROJECT
   ========================= */

.project-side {
    padding-right: 52px;
}

.project-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .2px;
}

.project-subtitle {
    margin: 5px 0 18px;
    font-size: 14px;
    color: rgba(255,255,255,.84);
}

.project-description {
    max-width: 590px;
    margin: 0 0 20px;

    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,.80);
}

/* =========================
   LOGOS
   ========================= */

.logo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;

    max-width: 720px;
}

.logo-card {
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border-radius: 7px;

    padding: 10px 12px;

    border: 1px solid rgba(255,255,255,.40);
}

.logo-card img {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 61px;

    object-fit: contain;
}

/* =========================
   RIGHT — RESEARCHER
   ========================= */

.researcher-side {
    border-left: 1px solid rgba(255,255,255,.28);
    padding-left: 48px;
}

.researcher-name {
    margin: 0 0 3px;

    font-size: 21px;
    font-weight: 700;
}

.researcher-role {
    margin-bottom: 12px;

    font-size: 14px;
    color: rgba(255,255,255,.82);
}

/* =========================
   SMALL LINKS
   ========================= */

.personal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;

    margin-bottom: 17px;

    font-size: 12.5px;
}

.personal-links a {
    color: #ffffff;
    text-decoration: none;

    border-bottom: 1px solid rgba(255,255,255,.40);

    padding-bottom: 1px;
}

.personal-links a:hover {
    border-bottom-color: #ffffff;
}

.link-separator {
    color: rgba(255,255,255,.45);
}

/* =========================
   AFFILIATION
   ========================= */

.affiliation {
    margin: 0;

    font-size: 13px;
    line-height: 1.6;

    color: rgba(255,255,255,.84);
}

.affiliation strong {
    color: #ffffff;
    font-weight: 600;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 950px) {

    .footer-container {
        grid-template-columns: 1fr;
    }

    .project-side {
        padding-right: 0;
        padding-bottom: 28px;
    }

    .researcher-side {
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.25);

        padding-left: 0;
        padding-top: 26px;
    }

    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 620px;
    }
}

@media (max-width: 520px) {

    .safeomni-footer {
        padding: 28px 18px;
    }

    .project-title {
        font-size: 21px;
    }

    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo-card {
        height: 78px;
    }

    .logo-card img {
        max-height: 56px;
    }

    .personal-links {
        gap: 6px;
    }
}


.tool-result-row {
    margin-bottom: 10px;
}

.tool-name {
    font-weight: 600;
    color: #333;
}

.hemo-result {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-safe {
    color: #4CAF50;
    font-weight: 600;
}

.result-unsafe {
    color: #F44336;
    font-weight: 600;
}

.result-neutral {
    color: #2196F3;
    font-weight: 600;
}

.amp-result, .toxi-result, .toxinpred-result, .macrel-amp-result, .macrel-hemo-result {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    background: #f5f5f5;
}

.amp-result .result-neutral, .toxi-result .result-safe, .toxi-result .result-unsafe, .toxi-result .result-neutral,
.toxinpred-result .result-safe, .toxinpred-result .result-unsafe, .toxinpred-result .result-neutral,
.macrel-amp-result .result-neutral, .macrel-hemo-result .result-safe, .macrel-hemo-result .result-unsafe {
    font-weight: 600;
}

.hemo-result .result-safe {
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 4px;
}

.hemo-result .result-unsafe {
    background: #ffebee;
    padding: 4px 10px;
    border-radius: 4px;
}

.sub-result {
    font-size: 0.85em;
    color: #666;
    margin-left: 20px;
}

.sub-name {
    font-weight: 500;
    color: #888;
}

.sub-value {
    color: #333;
}
