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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    min-height: 700px;
}

/* Panel Izquierdo */
.left-panel {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
}

.logo {
    color: #1ec78b;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.title {
    color: #1ec78b;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.title-underline {
    width: 60px;
    height: 3px;
    background: #1ec78b;
    margin-bottom: 20px;
}

.subtitle {
    color: #999;
    font-size: 14px;
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area.dragover {
    border-color: #1ec78b;
    background: #f0fdf9;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon {
    color: #1ec78b;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-subtext {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
}

.browse-btn {
    background: transparent;
    border: 2px solid #1ec78b;
    color: #1ec78b;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.browse-btn:hover {
    background: #1ec78b;
    color: white;
    transform: translateY(-2px);
}

.file-info {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.preview-container img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 8px;
    object-fit: contain;
}

.remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #ff3838;
    transform: scale(1.1);
}

.analyze-btn {
    background: #1ec78b;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.analyze-btn:hover:not(:disabled) {
    background: #19b577;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 199, 139, 0.3);
}

.analyze-btn:disabled {
    background: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

.result-area {
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

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

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    color: white;
}

.result-main {
    text-align: center;
}

.result-card.ai-detected {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.result-card.human-created {
    background: linear-gradient(135deg, #1ec78b 0%, #0fb570 100%);
}

.result-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.result-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.result-confidence {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.result-confidence span {
    font-weight: 600;
    font-size: 18px;
}

.result-description {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.model-stats {
    margin: 10px 0;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    text-align: left;
}

.model-stats-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.95;
}

.model-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.model-stat-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
}

.model-stat-label {
    display: block;
    font-size: 11px;
    opacity: 0.85;
    margin-bottom: 2px;
}

.model-stat-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.evidence-panel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    padding: 14px;
    text-align: left;
}

.evidence-title {
    font-size: 16px;
    margin-bottom: 6px;
}

.evidence-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.evidence-warning {
    font-size: 12px;
    line-height: 1.45;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.45);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.evidence-table-wrap {
    max-height: 220px;
    overflow: auto;
}

.evidence-table-wrap-main {
    max-height: 520px;
}

.evidence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.evidence-table th,
.evidence-table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    text-align: left;
    vertical-align: top;
}

.evidence-table th {
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    opacity: 0.9;
}

.evidence-measure {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.35;
    max-width: 180px;
}

.signal-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.signal-badge.high {
    background: rgba(255, 107, 107, 0.25);
    border: 1px solid rgba(255, 107, 107, 0.5);
}

.signal-badge.medium {
    background: rgba(255, 193, 7, 0.25);
    border: 1px solid rgba(255, 193, 7, 0.55);
}

.signal-badge.low {
    background: rgba(46, 213, 115, 0.2);
    border: 1px solid rgba(46, 213, 115, 0.5);
}

.signal-badge.warning {
    background: rgba(255, 193, 7, 0.22);
    border: 1px solid rgba(255, 193, 7, 0.55);
}

.footer-links {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1ec78b;
}

.footer-links span {
    margin: 0 10px;
}

/* Panel Derecho */
.right-panel {
    background: linear-gradient(135deg, #1ec78b 0%, #17a871 100%);
    padding: 50px 40px;
    color: white;
    display: flex;
    flex-direction: column;
}

.right-evidence-host {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.evidence-panel.evidence-panel-main {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    padding: 18px;
    flex: 1;
}

.evidence-panel-main .evidence-title {
    font-size: 26px;
    margin-bottom: 10px;
}

.info-note {
    background: rgba(255, 255, 255, 0.15);
    padding: 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    border-left: 4px solid white;
}

.info-note strong {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 968px) {
    .card {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        order: -1;
    }
    
    .left-panel, .right-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 600px) {
    .title {
        font-size: 24px;
    }
    
    .left-panel, .right-panel {
        padding: 30px 20px;
    }
    
    .upload-area {
        padding: 30px 20px;
        min-height: 240px;
    }

    .model-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .result-layout {
        grid-template-columns: 1fr;
    }
}
