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

body {
    background-image: url("../img/image.png");
    background-size: 35%;
    background-position: center right -58px;
    background-repeat: no-repeat;
    background-color: #000;
    font-family: 'Inter', sans-serif;
}

.container-fluid.index-view, 
.container-fluid.upload-view, 
.container-fluid.export-view {
    width: 90%;
}

nav .navbar-brand, .navbar-brand {
    font-size: 48px;
    font-weight: 700;
    line-height: 72px;
}

.left-section {
    height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Base Card Styles */
.card {
    width: 416px;
    min-height: 460px;
    height: auto !important;
    background-color: #fff;
    color: #000;
    border-radius: 15px;
    padding: 30px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.card .agree-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 48px;
    color: #0F172A;
}

.card .agree-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    color: #0F172A;
}

.card .agree-text button {
    border: none;
    background-color: transparent;
    text-decoration: underline;
    color: #2563EB;
}

.card .btn {
    background-color: #007bff;
    border: none;
    color: #fff;
    border-radius: 25px;
    padding: 10px 10px;
    font-size: 16px;
    font-weight: 600;
    width: 75%;
    margin-top: 15px;
}

.card-text button.privacy-policy {
    font-weight: 500;
}

/* Privacy Policy Modal */
#privacyPolicy .modal-dialog {
    max-width: 1344px;
}

#privacyPolicy .modal-body {
    padding: 20px 70px;
}

#privacyPolicy .modal-body h2 {
    color: #fff;
    font-size: 48px;
    font-weight: 600;
    line-height: 72px;
}

#privacyPolicy .modal-body p {
    font-size: 16px;
    color: #fff;
    font-weight: 400;
    line-height: 24px;
}

#privacyPolicy .btn-close {
    filter: invert(1);
}

/* Modal Scrollbar Styles */
#privacyPolicy .modal-body::-webkit-scrollbar {
    width: 10px;
}

#privacyPolicy .modal-body::-webkit-scrollbar-track {
    background: #222;
    border-radius: 5px;
}

#privacyPolicy .modal-body::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

#privacyPolicy .modal-body::-webkit-scrollbar-thumb:hover {
    background: #888;
}

#privacyPolicy .modal-body {
    scrollbar-color: #555 #222;
    scrollbar-width: thin;
}

/* Upload Container Styles */
.upload-view .card {
    min-height: 362px;
    height: auto !important;
    padding: 0;
}

.upload-container {
    width: 384px;
    height: 274px;
    border: 2px dashed #007bff;
    border-radius: 10px;
    padding: 20px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 15px auto;
}

.upload-container:hover {
    border-color: #0056b3;
}

.upload-icon {
    font-size: 40px;
    color: #007bff;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
    color: #0F172A;
}

/* File List Styles */
.file-list {
    margin: 20px 15px;
    font-size: 14px;
    color: #333;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.file-list ul {
    list-style: none;
    padding: 0;
}

.file-list li {
    margin-bottom: 10px;
    background-color: #F9FAFB;
    border-radius: 8px;
    padding: 10px 20px;
}

.file-list li .file-detail {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
}

.file-list li .file-detail span i {
    font-size: 16px;
    color: #2563EB;
}

.file-list li .file-detail button.preview-file {
    color: #2563EB;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
}

.file-list button .fa-xmark {
    color: #111827;
    font-size: 16px;
}

/* File Upload Card */
.card.file-upload {
    min-height: 258px;
    height: auto !important;
    padding: 20px 15px;
}

.file-upload .text-end button {
    width: 40%;
}

.file-upload .agree-title {
    color: #0F172A;
    font-size: 20px;
    line-height: 30px;
    font-weight: 700;
}

/* Export Screen */
.export-view .card {
    min-height: 342px;
    height: auto !important;
}

.export-view .card.download-mode {
    min-height: 286px;
    height: auto !important;
}

.delivery-options {
    padding: 20px;
    margin-top: 10px;
}

.export-option {
    margin-bottom: 15px;
}

.export-option input {
    margin-right: 8px;
}

.email-input {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    margin: 0;
}

.email-input.visible {
    max-height: 100px;
    opacity: 1;
    margin: 10px 0 15px;
}

.email-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #9CA3AF;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    font-weight: 400;
}

.email-input input:focus-visible {
    outline: none;
    border: 2px solid #2563EB;
}

.email-input input:valid {
    background-color: #EFF6FF;
    border: 2px solid #2563EB;
}

.hidden {
    display: none;
}

/* Status Icons */
.status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
}

.status-queued {
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    box-sizing: border-box;
}

.status-processing {
    border: 2px solid #2563EB;
    border-top-color: transparent;
    box-sizing: border-box;
    animation: spin 1s linear infinite;
}

.status-completed {
    background-color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-completed::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.status-failed {
    background-color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-failed::after {
    content: "✕";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Enhanced Modal Styles for Batch Results */
.conversion-summary {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.conversion-summary .text-success {
    color: #28a745 !important;
}

.conversion-summary .text-danger {
    color: #dc3545 !important;
}

.conversion-summary .fs-3 {
    font-size: 2rem !important;
}

/* Result Lists */
.conversion-results h6 {
    font-weight: 600;
    margin-bottom: 15px;
}

.conversion-results ul {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.conversion-results .text-success {
    color: #28a745 !important;
}

.conversion-results .text-danger {
    color: #dc3545 !important;
}

.conversion-results .text-muted {
    color: #6c757d !important;
    font-size: 0.875rem;
}

/* Download Buttons */
.download-zip-btn {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    transition: all 0.3s ease;
}

.download-zip-btn:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.download-file-btn {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    font-size: 0.8rem;
    padding: 4px 12px;
}

.download-file-btn:hover {
    background-color: #0056b3;
    border-color: #004085;
}

/* Enhanced Error Modal */
#errorModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#errorModal .text-danger .fs-1 {
    font-size: 3rem !important;
}

#errorModal .modal-body h5 {
    color: #dc3545;
    font-weight: 500;
}

/* Enhanced Completion Modal */
#conversionCompleteModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#conversionCompleteModal .modal-body h5 {
    color: #0F172A;
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
}

#conversionCompleteModal .btn-primary {
    border-radius: 25px;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#conversionCompleteModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Success Icon Animation */
.text-success .fa-check-circle {
    animation: checkmark 0.6s ease-in-out;
}

/* Failure Icon Styling */
.text-danger .fa-times-circle,
.text-danger .fa-exclamation-circle {
    color: #dc3545;
}

/* Loading States */
.btn.processing {
    position: relative;
    color: transparent !important;
}

.btn.processing::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Scrollbar Styling for Result Lists */
.conversion-results ul::-webkit-scrollbar {
    width: 8px;
}

.conversion-results ul::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.conversion-results ul::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

.conversion-results ul::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

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

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Media Queries */
@media (max-width: 1440px) and (min-width: 1366px) {
    body {
        background-size: 38%;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 42px;
        line-height: 66px;
    }

    .card {
        min-height: 365px;
    }

    .icon svg {
        width: 60px !important;
        height: 60px !important;
    }

    .icon.mb-5 {
        margin-bottom: 1rem !important;
    }

    .card-body .card-text.agree-text.mb-5 {
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 1366px) and (min-width: 1281px) {
    body {
        background-size: 35%;
        background-position: center right -45px;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 42px;
        line-height: 66px;
    }

    .card {
        min-height: 365px;
    }

    .icon svg {
        width: 60px !important;
        height: 60px !important;
    }

    .icon.mb-5 {
        margin-bottom: 1rem !important;
    }

    .card-body .card-text.agree-text.mb-5 {
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 1280px) and (min-width: 1154px) {
    body {
        background-size: 38%;
        background-position: center right -50px;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 42px;
        line-height: 66px;
    }

    .card {
        min-height: 366px;
    }
}

@media (max-width: 1153px) and (min-width: 1024px) {
    body {
        background-size: 40%;
        background-position: center right -48px;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 38px;
        line-height: 66px;
    }
}

@media (max-width: 1024px) and (min-width: 991px) {
    body {
        background-size: 45%;
        background-position: center right -50px;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 34px;
        line-height: 66px;
    }

    .card {
        width: 350px;
    }

    .upload-view .upload-container {
        width: 318px;
        height: 255px;
    }

    .file-list li .file-detail {
        font-size: 10px;
    }

    .file-upload .text-end button {
        font-size: 12px;
    }
}

@media (max-width: 991px) and (min-width: 800px) {
    body {
        background-size: 54%;
        background-position: center right -46px;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 30px;
        line-height: 66px;
    }

    .card {
        width: 285px;
    }

    .upload-view .upload-container {
        width: 254px;
        height: 200px;
    }

    .file-list li .file-detail {
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 800px) {
    body {
        background-image: none;
    }

    .left-section {
        justify-content: center;
    }

    nav .container-fluid {
        justify-content: center !important;
    }

    nav .navbar-brand, .navbar-brand {
        font-size: 30px;
        line-height: 66px;
        margin-left: 0 !important;
    }

    .card {
        width: 285px;
    }

    .upload-view .upload-container {
        width: 254px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .conversion-summary .row .col-6 {
        margin-bottom: 15px;
    }
    
    .conversion-results ul {
        max-height: 150px;
        font-size: 0.875rem;
    }
    
    #conversionCompleteModal .modal-dialog {
        margin: 20px;
    }
}

@media (max-width: 320px) {
    .upload-view .upload-container {
        width: 230px;
        padding: 15px;
    }

    .file-upload .text-end button {
        width: 50%;
    }
}