/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #FAFAFA;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container - Split Layout */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
}

/* ASCII abstract pattern - right panel only */
.ascii-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 6px;
    line-height: 1.2;
    color: #00AEEF;
    opacity: 0.14;
    pointer-events: none;
    z-index: 1;
    white-space: pre;
    overflow: hidden;
}

/* Left Panel */
.left-panel {
    flex: 0 0 48%;
    max-width: 48%;
    display: flex;
    flex-direction: column;
    padding: 48px 64px;
    overflow-y: auto;
    position: relative;
    background: #FFFFFF;
}

/* Elegant divider */
.left-panel::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    height: 80%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 174, 239, 0.2) 20%,
        rgba(0, 174, 239, 0.3) 50%,
        rgba(0, 174, 239, 0.2) 80%,
        transparent 100%
    );
}

/* Header / Logo */
.header {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.logo img {
    height: 36px;
    width: auto;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    margin-bottom: 40px;
}

.headline {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: #0a0a0a;
}

.subheadline {
    font-size: 18px;
    font-weight: 400;
    color: #555;
    line-height: 1.7;
    max-width: 480px;
}

/* News Cards */
.news-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 18px 22px;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

.news-card:hover {
    border-color: rgba(0, 0, 0, 0.25);
    background: #FAFAFA;
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0;
    border: none;
    color: #000;
    background: none;
}

.date {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.02em;
}

.arrow-icon {
    opacity: 0.4;
    transition: all 0.25s ease;
}

.news-card:hover .arrow-icon {
    opacity: 0.8;
    transform: translate(2px, -2px);
}

.news-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

/* Right Panel */
.right-panel {
    flex: 0 0 52%;
    max-width: 52%;
    position: relative;
    background: linear-gradient(145deg, #F8FBFD 0%, #F0F4F8 50%, #E8EEF4 100%);
    overflow: hidden;
}

#webgl-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 2;
}

/* Detection overlay */
#detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

/* Detection box container */
.detection-box {
    position: absolute;
    pointer-events: none;
}

/* Corner brackets - refined styles */
.detection-box .corner-tl,
.detection-box .corner-tr,
.detection-box .corner-bl,
.detection-box .corner-br {
    position: absolute;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-width: 0;
    opacity: 0.7;
}

/* Top-left corner */
.detection-box .corner-tl {
    top: 0;
    left: 0;
    border-top-width: 1.5px;
    border-left-width: 1.5px;
    border-top-left-radius: 2px;
}

/* Top-right corner */
.detection-box .corner-tr {
    top: 0;
    right: 0;
    border-top-width: 1.5px;
    border-right-width: 1.5px;
    border-top-right-radius: 2px;
}

/* Bottom-left corner */
.detection-box .corner-bl {
    bottom: 0;
    left: 0;
    border-bottom-width: 1.5px;
    border-left-width: 1.5px;
    border-bottom-left-radius: 2px;
}

/* Bottom-right corner */
.detection-box .corner-br {
    bottom: 0;
    right: 0;
    border-bottom-width: 1.5px;
    border-right-width: 1.5px;
    border-bottom-right-radius: 2px;
}

/* Detection label - refined */
.detection-label {
    position: absolute;
    top: -40px;
    left: 0;
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 5px 8px;
    white-space: nowrap;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detection-label .data-row {
    display: flex;
    gap: 8px;
}

.detection-label .data-field {
    font-variant-numeric: tabular-nums;
    opacity: 0.95;
}

.detection-label .rec-row {
    font-size: 8px;
    font-weight: 500;
    transition: opacity 0.1s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .left-panel {
        padding: 36px 44px;
    }
    
    .headline {
        font-size: 32px;
    }
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    
    .left-panel,
    .right-panel {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    
    .left-panel {
        min-height: auto;
        padding: 32px 24px;
    }
    
    .left-panel::after {
        display: none;
    }
    
    .right-panel {
        height: 50vh;
        min-height: 400px;
    }
    
    .main-content {
        max-width: 100%;
    }
    
    .headline {
        font-size: 28px;
    }
}
