
/* === BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    padding: 20px;
}

/* === LAYOUT === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.content {
    padding: 40px;
}

/* === HEADER === */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-logo img {
    max-height: 60px;
    max-width: 150px;
    width: auto;
    height: auto;
}

.header-content {
    flex: 1;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.1em;
    opacity: 0.9;
}

.experimental-service {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    color: #0A8899;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.info-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    color: #0A8899;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
    font-weight: 600;
}

.info-link:hover {
    color: #fff;
    text-decoration: underline;
}

.acknowledgment {
    font-size: 0.85em;
    opacity: 0.85;
    margin-top: 15px;
    font-style: italic;
}

/* === BUTTONS === */
.btn {
    background: #0A8899;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn:hover {
    background-color: #086d7a;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(10, 136, 153, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-filter {
    padding: 12px 24px;
    white-space: nowrap;
    background: #0A8899;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn-filter:hover {
    background: #086d7a;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(10, 136, 153, 0.4);
}

.btn-filter-secondary {
    padding: 12px 24px;
    white-space: nowrap;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn-filter-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* === MODALS === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.info-modal-content h2 {
    color: #0A8899;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-modal-content h3 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.info-modal-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f0f8ff;
    border-left: 5px solid #0A8899;
    font-style: italic;
    color: #333;
}

.info-modal-content ul {
    list-style-type: none;
    padding-left: 0;
}

.info-modal-content ul li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.info-modal-content ul li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #28a745;
}

.disclaimer-text {
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
    text-align: justify;
}

.disclaimer-text p {
    margin-bottom: 15px;
}

/* === INPUT SECTIONS === */
.input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.input-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.input-group input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #0A8899;
}

/* === ERROR STYLE === */
.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.error.active {
    display: block;
}

/* === LOADING === */
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading.active {
    display: block;
}

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

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

/* === AS-SET CONFIG SECTION === */
.asset-config {
    background: #f0f8ff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #bee5eb;
}

.asset-config h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-field label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.config-field input,
.config-field select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    background: white;
}

.config-field input:focus,
.config-field select:focus {
    outline: none;
    border-color: #0A8899;
}

/* === TABS === */
.tabs-container {
    display: none;
}

.tabs-container.active {
    display: block;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 30px;
    gap: 5px;
}

.tab {
    background: transparent;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
    position: relative;
}

.tab:hover {
    color: #0A8899;
    background: #f8f9fa;
}

.tab.active {
    color: #0A8899;
    border-bottom-color: #0A8899;
}

.tab .count-badge {
    background-color: #34495e;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-size: 0.9em;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === FILTER CONTROLS === */
.filter-controls {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* === TABLES === */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

tr:hover {
    background: #f8f9fa;
}

code {
    font-family: 'Courier New', monospace;
    white-space: pre;
    font-weight: 600;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* === RPSL OUTPUT === */
.rpsl-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rpsl-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rpsl-output {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    color: #333;
    resize: vertical;
}

.rpsl-output:focus {
    outline: none;
    border-color: #0A8899;
}

/* === CONE HIERARCHY === */
.hierarchy-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#coneNetwork {
    min-height: 300px;
    max-height: 750px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: auto;
    padding: 10px;
}

#coneNetwork svg {
    display: block;
    max-width: none;
}

.network-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    gap: 15px;
    font-size: 1.1em;
}

.network-placeholder i {
    font-size: 3em;
    opacity: 0.4;
}

/* === DATA SOURCES MODAL === */
.data-source-modal-content {
    max-width: 900px;
}

.data-source-modal-content h2 {
    color: #0A8899;
    margin-bottom: 10px;
    font-size: 2em;
}

.data-source-modal-content .subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.data-source {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid #0A8899;
    display: flex;
    gap: 25px;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.data-source:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 136, 153, 0.2);
}

.source-logo {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.source-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.source-info {
    flex: 1;
}

.source-info h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.3em;
}

.source-info h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.source-info h3 a:hover {
    color: #0A8899;
    text-decoration: underline;
}

/* === COMPARISON STATUS BADGES === */
.badge-status { padding: 2px 8px; border-radius: 4px; font-size: 0.85em; font-weight: 600; white-space: nowrap; }
.badge-both   { color: #155724; background: #d4edda; }
.badge-cone   { color: #004085; background: #cce5ff; }
.badge-asset  { color: #856404; background: #fff3cd; }

/* === INLINE INPUT+BUTTON GROUP === */
.input-group-inline { display: flex; gap: 10px; }
.input-group-inline input { flex: 1; padding: 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 1em; transition: border-color 0.3s; }
.input-group-inline input:focus { outline: none; border-color: #0A8899; }

/* === WIDE CONFIG FIELD (spans both grid columns) === */
.config-field-wide { grid-column: 1 / -1; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .header-logo {
        order: 2;
        margin-top: 15px;
    }

    .header-content {
        order: 1;
    }

    .header-logo.logo-right {
        order: 3;
    }

    .tabs {
        flex-direction: column;
        border-bottom: none;
        border-right: 2px solid #dee2e6;
    }

    .tab {
        text-align: left;
        border-bottom: none;
        border-right: 3px solid transparent;
    }

    .tab.active {
        border-bottom-color: transparent;
        border-right-color: #0A8899;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }
}
