@charset "UTF-8";
@import url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy.css');



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Paperlogy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    scrollbar-width: thin;
    color: #333;
}

body.risk-assessment-page {
    background: linear-gradient(135deg, #fda4af 0%, #fb7185 100%);
}

body.image-analysis-page {
    background: linear-gradient(135deg, #93c5fd 0%, #a78bfa 100%);
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header nav {
    margin-left: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: #4c51bf;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-item {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.nav-item:hover:not(.active) {
    background: #f3f4f6;
    color: #4c51bf;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.main-title {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Info Button */
.info-button {
    display: block;
    margin: 0 auto 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Upload Section */
.dropzone-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.upload-area {
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: #f9fafb;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #6366f1;
    background: #f0f9ff;
}

.upload-area.dragover {
    border-color: #6366f1;
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-area.has-image {
    padding: 0;
    background: transparent;
    border: none;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-subtext {
    color: #6b7280;
    font-size: 0.9rem;
}

.uploaded-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    display: none;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.upload-area.has-image:hover .image-overlay {
    display: flex;
}

.overlay-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.overlay-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.file-input {
    display: none;
}

/* Loading Section */
.loading-section {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.25rem;
    color: #374151;
    font-weight: 600;
}

/* Analysis Section */
.analysis-section {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Results Grid (for photo analysis page) */
.results-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-card {
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 5px solid;
}

.result-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-icon {
    width: 24px;
    height: 24px;
}

.hazards-card {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.hazards-card h3 {
    color: #dc2626;
}

.engineering-card {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.engineering-card h3 {
    color: #2563eb;
}

.administrative-card {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.administrative-card h3 {
    color: #16a34a;
}

.regulations-card {
    background: #faf5ff;
    border-left-color: #a855f7;
}

.regulations-card h3 {
    color: #9333ea;
}

.result-list {
    list-style: none;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.result-item:last-child {
    border-bottom: none;
}

.item-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    margin-top: 2px;
}

.hazards-card .item-number {
    background: #ef4444;
}

.engineering-card .item-number {
    background: #3b82f6;
}

.administrative-card .item-number {
    background: #22c55e;
}

.item-text {
    flex: 1;
    line-height: 1.6;
    color: #374151;
}

.regulation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.regulation-item:hover {
    border-color: #a855f7;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.15);
}

.regulation-item:last-child {
    margin-bottom: 0;
}

.regulation-text {
    flex: 1;
    color: #374151;
    font-weight: 500;
}

.regulation-link {
    color: #a855f7;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.regulation-link:hover {
    color: #7c3aed;
}

/* Risk Assessment Table (for risk assessment page) */
.risk-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.risk-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.risk-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.risk-table td {
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.risk-table tbody tr:hover {
    background: #f9fafb;
}

.risk-table tbody tr:last-child td {
    border-bottom: none;
}

.hazard-cell {
    max-width: 300px;
    line-height: 1.5;
}

.severity-cell, .likelihood-cell {
    text-align: center;
    font-weight: 600;
    width: 80px;
}

.risk-score-cell {
    text-align: center;
    font-weight: 700;
    width: 80px;
    border-radius: 6px;
    color: white;
}

.risk-high {
    background: #ef4444;
}

.risk-medium {
    background: #f59e0b;
}

.risk-low {
    background: #10b981;
}


/* 모바일 카드형 레이아웃 */
.mobile-risk-cards {
    display: none;
}

.risk-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.risk-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.risk-card-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
}

.risk-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.risk-badge.high {
    background: #ef4444;
}

.risk-badge.medium {
    background: #f59e0b;
}

.risk-badge.low {
    background: #10b981;
}

.risk-card-content {
    margin-bottom: 1rem;
}

.risk-card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.risk-card-label {
    font-weight: 600;
    color: #6b7280;
    min-width: 60px;
}

.risk-card-value {
    color: #374151;
    text-align: right;
}

.risk-card-hazard {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #374151;
}

.risk-card-control {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #374151;
}

.control-label {
    font-weight: 600;
    color: #4c51bf;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .risk-table-container {
        display: none;
    }

    .mobile-risk-cards {
        display: block;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

/* 태블릿 크기에서도 카드형 레이아웃 사용 */
@media (max-width: 1024px) {
    .risk-table-container {
        display: none;
    }

    .mobile-risk-cards {
        display: block;
    }

    .risk-card {
        padding: 1.25rem;
    }
}

/* 데스크톱에서는 테이블만 표시 */
@media (min-width: 1025px) {
    .risk-table-container {
        display: block;
    }

    .mobile-risk-cards {
        display: none;
    }
}

.control-cell {
    max-width: 300px;
    line-height: 1.5;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show {
    display: flex;
}

.popup-overlay.show .popup {
    transform: scale(1);
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

.popup-content {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Criteria Popup Styles */
.criteria-content {
    max-height: 60vh;
    overflow-y: auto;
}

.criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.criteria-table th {
    background: #f3f4f6;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid #d1d5db;
}

.criteria-table td {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    text-align: center;
}

.criteria-section {
    margin-bottom: 2rem;
}

.criteria-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.risk-matrix {
    font-size: 0.8rem;
}

.risk-matrix td {
    padding: 0.5rem;
}

.matrix-high {
    background: #fecaca;
    color: #991b1b;
    font-weight: 600;
}

.matrix-medium {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.matrix-low {
    background: #d1fae5;
    color: #065f46;
    font-weight: 600;
}

/* Button Styles */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header nav {
        margin-left: 0;
    }

    .nav-menu {
        margin: 15px 0;
        flex-direction: row;
        gap: 0.5rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .main-subtitle {
        margin-bottom: 2rem;
    }

    .dropzone-container {
        padding: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
        min-height: 250px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .risk-table {
        font-size: 0.85rem;
    }

    .risk-table th,
    .risk-table td {
        padding: 0.75rem 0.5rem;
    }

    .popup {
        margin: 1rem;
        padding: 1.5rem;
    }

    .popup-buttons {
        flex-direction: column;
    }
}

.coupang-partners-banner {
    min-height: 120px;
    background: rgb(245, 245, 245);
    border: 1px solid rgb(229 231 235);
    border-radius: .5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
