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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Application Container */
.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #ffffff;
}

/* Header */
.header {
    padding: 16px 24px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    height: 40px;
}

.lang-menu {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.lang-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.lang-flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
}

.lang-flag-small {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 12px;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 140px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 10;
}

.lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    color: #4b5563;
}

.lang-option:hover {
    background-color: #f9fafb;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    height: 28px;
    object-fit: contain;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 24px;
}

/* Content Wrapper */
.content-wrapper {
    padding: 0 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.instruction-text {
    color: #374151;
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.6;
    text-align: justify;
}

/* Upload Grid */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px dashed #6b7280;
    border-radius: 8px;
    background-color: #ffffff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.aspect-3-2 {
    aspect-ratio: 3 / 2;
}

.aspect-wide {
    height: 100px;
}

.col-span-2 {
    grid-column: span 2;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.upload-title {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.3;
}

.upload-icon {
    width: 20px;
    height: 20px;
    color: #000000;
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.disclaimer-text {
    color: #4b5563;
    font-size: 13px;
    margin-bottom: 32px;
    line-height: 1.6;
    text-align: justify;
}

/* Footer */
.footer {
    padding: 24px;
    background-color: #ffffff;
    margin-top: auto;
}

.btn-primary {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #175f9e; /* Mobifone blue approx */
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-primary:active {
    background-color: #124d80;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.modal-title {
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
}

.modal-text {
    font-family: inherit;
    color: #374151;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Camera Overlay */
.camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

#camera-video {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 24px 32px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.camera-btn {
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.camera-shutter-btn {
    width: 64px;
    height: 64px;
    background-color: #ffffff;
    border-radius: 50%;
    border: 4px solid #d1d5db;
    cursor: pointer;
}

.camera-shutter-btn:active {
    background-color: #e5e7eb;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Loader */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Warning Modal Styles */
.warning-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.warning-list {
    margin-bottom: 24px;
    text-align: left;
    font-size: 14px;
    color: #9a3412; /* màu cam đất đậm để báo warning tốt hơn */
    background-color: #fff7ed; /* cam nhạt */
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #ffedd5;
    max-height: 180px;
    overflow-y: auto;
}

.warning-item {
    margin-bottom: 8px;
    line-height: 1.5;
    position: relative;
    padding-left: 16px;
}

.warning-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ea580c;
    font-weight: bold;
}

.warning-item:last-child {
    margin-bottom: 0;
}

/* Uploaded Image Success Indicator */
.upload-btn.uploaded-blur {
    opacity: 0.55;
    border-color: #10b981;
    border-style: solid;
}

.success-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background-color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

.success-icon {
    width: 24px;
    height: 24px;
}
