@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

body.modal-open {
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.top-bar-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-browser-link {
    font-size: 1.5rem;
    text-decoration: none;
    color: #0072BC;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.file-browser-link:hover {
    transform: scale(1.1);
}

.top-bar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0072BC;
    flex-shrink: 0;
}

.url-config {
    display: flex;
    gap: 8px;
    flex: 1;
}

.filter-options {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.filter-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0072BC;
}

.filter-label:hover {
    color: #0072BC;
}

.url-config input[type="text"] {
    flex: 1;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    color: #333;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
}

.url-config input[type="text"]:focus {
    outline: none;
    border-color: #0072BC;
    background: #ffffff;
}

.btn-load {
    background: #0072BC;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-load:hover {
    background: #005a94;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #e0e0e0;
    border-top: 3px solid #0072BC;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading p {
    color: #666;
    font-size: 0.9rem;
}

/* Error message */
.error-message {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px;
    font-size: 0.9rem;
}

/* Statements list */
.statements-list {
    display: flex;
    flex-direction: column;
}

/* Statement card */
.statement-card {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 16px;
    transition: background 0.2s;
}

.statement-card:hover {
    background: #f9f9f9;
}

/* Statement header */
.statement-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

/* Profile picture */
.profile-picture {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
}

/* Identity verified badge */
.identity-verified-badge {
    display: inline-block;
    margin-left: 4px;
    color: #0072BC;
    font-size: 0.875rem;
    font-weight: bold;
    vertical-align: middle;
}
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #003366;
}

.domain-time {
    font-size: 0.9375rem;
    color: #666;
}

.domain-link {
    color: #0072BC;
    text-decoration: none;
    transition: color 0.2s;
}

.domain-link:hover {
    color: #005a94;
    text-decoration: underline;
}

.verify-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.verify-badge.verified {
    background: #0072BC;
    color: white;
}

.verify-badge.unverified {
    background: #dc2626;
    color: white;
}

/* Statement content */
.statement-content {
    color: #333;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.statement-keyword {
    color: #0072BC;
    font-weight: 600;
}

/* Attachments */
.statement-attachments {
    margin-bottom: 12px;
}

/* Image attachments */
.attachment-image-container {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.attachment-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.attachment-image:hover {
    opacity: 0.9;
}

/* PDF attachments */
.attachment-pdf-container {
    margin: 12px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.attachment-pdf-title {
    background: #ffffff;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    color: #003366;
    font-size: 0.9rem;
    font-weight: 600;
}

.attachment-pdf-embed {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

.attachment-download-link {
    display: block;
    text-align: center;
    padding: 12px;
    background: #0072BC;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.attachment-download-link:hover {
    background: #005a94;
}

/* Video attachments */
.attachment-video-container {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.attachment-video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
}

/* Action bar */
.action-bar {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.action-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #0072BC;
}

/* Responses container */
.responses-container {
    background: #f9f9f9;
    border-left: 3px solid #0072BC;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 16px 12px 24px;
}

.responses-header {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Response card */
.response-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.response-card:last-child {
    margin-bottom: 0;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.response-meta {
    flex: 1;
}

.response-domain {
    font-size: 0.875rem;
    font-weight: 600;
    color: #003366;
}

.response-author {
    font-size: 0.8125rem;
    color: #666;
}

.response-time {
    font-size: 0.8125rem;
    color: #666;
}

.peer-badge {
    background: #003366;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.response-content {
    color: #333;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.response-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.response-signature-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

.response-signature-indicator.verified {
    background: #e6f2ff;
    color: #0072BC;
}

.response-signature-indicator.unverified {
    background: #fee;
    color: #dc2626;
}

.response-details-btn {
    background: transparent;
    border: 1px solid #d0d0d0;
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.response-details-btn:hover {
    background: #f0f0f0;
    color: #0072BC;
    border-color: #0072BC;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.modal-close:hover,
.modal-close:focus {
    color: #003366;
}

.modal-content h2 {
    color: #003366;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content h3 {
    color: #0072BC;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 700;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.875rem;
}

.detail-table td:first-child {
    width: 180px;
    color: #666;
    font-weight: 600;
}

.detail-table td:last-child {
    color: #333;
}

.monospace {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    word-break: break-all;
}

.warning-text {
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 0.875rem;
}

.raw-statement {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #666;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive design */
@media (max-width: 768px) {
    .top-bar-content {
        padding: 8px 12px;
    }

    .top-bar h1 {
        font-size: 1.125rem;
    }

    .url-config input[type="text"] {
        font-size: 0.8125rem;
    }

    .statement-card {
        padding: 12px;
    }

    .attachment-pdf-embed {
        height: 300px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 16px;
    }

    .detail-table td:first-child {
        width: 120px;
    }
}

/* Votes container */
.votes-container {
    background: #f0f8ff;
    border-left: 3px solid #0072BC;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 16px 12px 24px;
}

.votes-header {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Vote results */
.votes-results {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.vote-result-row {
    margin-bottom: 12px;
}

.vote-result-row:last-child {
    margin-bottom: 0;
}

.vote-option-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #003366;
    margin-bottom: 6px;
}

.vote-bar-container {
    position: relative;
    background: #f0f0f0;
    border-radius: 4px;
    height: 28px;
    overflow: hidden;
}

.vote-bar {
    background: linear-gradient(90deg, #0072BC, #005a94);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.vote-count-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333;
}

/* Votes toggle button */
.votes-toggle-btn {
    background: transparent;
    border: 1px solid #0072BC;
    color: #0072BC;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
    width: 100%;
    margin-bottom: 8px;
}

.votes-toggle-btn:hover {
    background: #0072BC;
    color: white;
}

/* Individual votes list */
.votes-list-container {
    margin-top: 8px;
}

.vote-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.vote-card:last-child {
    margin-bottom: 0;
}

.vote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.voter-info {
    font-size: 0.875rem;
    font-weight: 600;
    color: #003366;
    flex: 1;
}

.vote-time {
    font-size: 0.8125rem;
    color: #666;
}

.vote-signature-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 4px;
}

.vote-signature-indicator.verified {
    background: #e6f2ff;
    color: #0072BC;
}

.vote-signature-indicator.unverified {
    background: #fee;
    color: #dc2626;
}