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

body {
    font-family: 'Roboto', sans-serif;
    background: #fafafa;
    min-height: 100vh;
    padding: 20px;
    color: #1a1a1a;
}

.results-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-height: auto;
    overflow: visible;
}

.results-card p {
    margin-bottom: 12px;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    color: black;
    font-size: 0.95rem;
}

.results-category {
    margin-bottom: 30px;
}

.results-category h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #333;
}


.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: #000000;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.upload-section {
    margin-bottom: 30px;
}

.upload-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #000000;
}

.upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #333333;
    background: #f5f5f5;
}

.upload-area.drag-over {
    border-color: #000000;
    background: #f0f0f0;
    transform: scale(1.02);
}

.upload-placeholder svg {
    color: #666666;
    margin-bottom: 15px;
}

.upload-placeholder p {
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 0.9rem;
    color: #666666;
}

.preview-container {
    margin-top: 20px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}

.remove-image:hover {
    background: rgba(0, 0, 0, 1);
}

.pdf-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.pdf-icon {
    width: 48px;
    height: 48px;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
}

.pdf-info {
    flex: 1;
}

.pdf-info strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.pdf-info span {
    color: #666666;
    font-size: 0.9rem;
}

.remove-pdf {
    background: #000000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-pdf:hover {
    background: #333333;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
    background: #333333;
}

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.jurisdiction-dropdown-container {
    position: relative;
    margin-bottom: 20px;
}

.jurisdiction-dropdown-btn {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.jurisdiction-dropdown-btn:hover {
    border-color: #333333;
}

.jurisdiction-dropdown-btn:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.jurisdiction-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #d0d0d0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.jurisdiction-option {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.jurisdiction-option:hover {
    background-color: #f5f5f5;
}

.jurisdiction-option:last-child {
    border-bottom: none;
}

.jurisdiction-checkbox {
    cursor: pointer;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #000000;
}

.jurisdiction-option label {
    cursor: pointer;
    flex-grow: 1;
    margin: 0;
    font-size: 1rem;
}

.loading-state {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #e0e0e0;
    border-top: 4px solid #000000;
    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);
    }
}

.loading-state p {
    color: #1a1a1a;
    font-size: 1.1rem;
}

.results-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.results-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #000000;
}

.compliant-section,
.non-compliant-section {
    margin-bottom: 30px;
}

.compliant-section h3 {
    color: #000000;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.non-compliant-section h3 {
    color: #000000;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.compliant-card {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #000000;
}

.compliant-card p {
    color: #1a1a1a;
    line-height: 1.6;
}

.non-compliant-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #d0d0d0;
    border-left: 4px solid #000000;
}

.non-compliant-card h4 {
    color: #000000;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.non-compliant-card p {
    color: #333333;
    margin-bottom: 8px;
    line-height: 1.6;
}

.non-compliant-card strong {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
}

.error-section {
    background: #fafafa;
    border: 1px solid #d0d0d0;
    color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.error-section h3 {
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #666666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 25px;
    }

    .upload-area {
        padding: 30px 20px;
    }

    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .submit-btn {
        font-size: 1rem;
        padding: 15px;
    }
}

/* Results Page Styles */
.results-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: #000000;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.results-divider {
    height: 2px;
    background: #000000;
    margin: 40px 0;
}

.results-compliant-section,
.results-non-compliant-section {
    margin-bottom: 40px;
}

.results-section-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.results-compliant-card {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #000000;
    color: #000000;
    line-height: 1.6;
    font-size: 1rem;
}

.results-non-compliant-card {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #000000;
    border-left: 4px solid #000000;
}

.results-field-label {
    font-weight: 700;
    color: #000000;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.results-field-label:first-child {
    margin-top: 0;
}

.results-field-text {
    color: #000000;
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 1rem;
}

.results-empty-state {
    text-align: center;
    padding: 30px;
    color: #666666;
    font-style: italic;
    font-size: 1rem;
}

.results-back-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0;
    padding: 15px 30px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.results-back-button:hover {
    background: #333333;
}

/* Jurisdiction Selector Styles */
#jurisdictionSelectorContainer {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

#jurisdictionSelectorContainer label {
    display: inline-block;
    margin-right: 15px;
    color: #333;
    font-size: 1rem;
}

#jurisdictionSelect {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    cursor: pointer;
    background-color: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 200px;
}

#jurisdictionSelect:hover {
    border-color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#jurisdictionSelect:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#loadingState {
    text-align: center;
    display: none;
    padding: 60px 40px;
}

#loadingState.loading-state {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#loadingState p {
    font-size: 1.1rem;
    color: #333;
    margin-top: 20px;
}

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

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

@media (max-width: 768px) {
    .results-page {
        padding: 20px 15px;
    }

    .results-title {
        font-size: 1.5rem;
    }

    .results-section-header {
        font-size: 1.1rem;
    }

    .results-divider {
        margin: 25px 0;
    }

    #jurisdictionSelectorContainer {
        display: flex;
        flex-direction: column;
    }

    #jurisdictionSelectorContainer label {
        margin-right: 0;
        margin-bottom: 10px;
    }

    #jurisdictionSelect {
        width: 100%;
    }
}