.jai-tool-container {
    max-width: 1050px;
    margin: 30px auto;
    padding: 15px;
    font-family: Arial, sans-serif;
    color: #222;
}

.jai-tool-hero {
    background: linear-gradient(135deg, #0B3D91, #06295f);
    color: #ffffff;
    padding: 42px 24px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(11, 61, 145, 0.22);
}

.jai-hero-badge {
    display: inline-block;
    background: #FF9933;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 14px;
}

.jai-tool-hero h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 800;
}

.jai-tool-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #eef4ff;
    font-size: 17px;
    line-height: 1.6;
}

.jai-tool-box {
    background: #ffffff;
    border: 1px solid #dbe4f5;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(11, 61, 145, 0.08);
}

.jai-drop-zone {
    border: 2px dashed #0B3D91;
    background: #f7faff;
    border-radius: 18px;
    padding: 34px 18px;
    text-align: center;
    transition: 0.2s ease;
}

.jai-drop-zone.jai-dragover {
    background: #eef5ff;
    border-color: #FF9933;
    transform: scale(1.01);
}

.jai-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0B3D91;
    color: #ffffff;
    width: 78px;
    height: 78px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 15px;
    box-shadow: 0 8px 18px rgba(11, 61, 145, 0.2);
}

.jai-drop-zone h2 {
    color: #0B3D91;
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.3;
}

.jai-drop-zone p {
    color: #555;
    margin: 0 0 16px;
    font-size: 15px;
}

#jai-docx-file {
    display: none;
}

#jai-select-btn {
    border: none;
    background: #FF9933;
    color: #ffffff;
    padding: 13px 22px;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
}

#jai-select-btn:hover {
    opacity: 0.95;
}

.jai-supported {
    margin-top: 14px;
    color: #666;
    font-size: 13px;
}

.jai-file-info {
    margin: 16px 0 0;
    text-align: center;
    font-weight: 700;
    color: #0B3D91;
}

.jai-mode-box {
    margin: 22px 0 10px;
    background: #f7faff;
    border: 1px solid #d9e3f5;
    border-radius: 16px;
    padding: 18px;
}

.jai-mode-title {
    font-weight: 800;
    color: #0B3D91;
    margin-bottom: 13px;
    font-size: 18px;
}

.jai-mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 13px;
}

.jai-mode-option {
    display: block;
    background: #ffffff;
    border: 2px solid #dbe3f5;
    border-radius: 14px;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

.jai-mode-option:hover {
    border-color: #0B3D91;
    box-shadow: 0 8px 20px rgba(11, 61, 145, 0.08);
}

.jai-mode-option input {
    margin-right: 8px;
}

.jai-mode-option strong {
    color: #0B3D91;
    font-size: 15px;
}

.jai-mode-option span {
    display: block;
    margin-top: 7px;
    color: #555;
    font-size: 13px;
    line-height: 1.45;
}

.jai-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 22px 0;
}

.jai-action-row button {
    border: none;
    border-radius: 11px;
    padding: 13px 22px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

.jai-action-row button:hover:not(:disabled) {
    transform: translateY(-1px);
    opacity: 0.95;
}

#jai-preview-btn {
    background: #0B3D91;
    color: #ffffff;
}

#jai-convert-btn {
    background: #198754;
    color: #ffffff;
}

#jai-reset-btn {
    background: #FF9933;
    color: #ffffff;
}

.jai-action-row button:disabled {
    background: #cfcfcf !important;
    color: #777777 !important;
    cursor: not-allowed;
    transform: none;
}

.jai-progress-wrap {
    width: 100%;
    height: 10px;
    background: #e9eef8;
    border-radius: 20px;
    overflow: hidden;
    display: none;
    margin-bottom: 15px;
}

.jai-progress-bar {
    width: 0%;
    height: 100%;
    background: #FF9933;
    transition: width 0.3s ease;
}

.jai-status {
    min-height: 24px;
    text-align: center;
    font-weight: 800;
    margin-bottom: 16px;
    color: #333;
}

.jai-note {
    background: #eef5ff;
    border: 1px solid #cfe0ff;
    border-radius: 14px;
    padding: 14px;
    color: #12325d;
    line-height: 1.6;
    margin-bottom: 14px;
    font-size: 14px;
}

.jai-warning {
    background: #fff8ef;
    border: 1px solid #ffd39c;
    border-radius: 14px;
    padding: 14px;
    color: #5a3d16;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.jai-preview-title {
    color: #0B3D91;
    margin: 0 0 10px;
    font-size: 21px;
}

.jai-preview-area {
    background: #ffffff;
    border: 1px solid #d7d7d7;
    border-radius: 16px;
    padding: 22px;
    min-height: 330px;
    max-height: 680px;
    overflow: auto;
}

#jai-preview-content {
    color: #222222;
    font-size: 15px;
    line-height: 1.55;
    word-break: break-word;
}

#jai-preview-content h1,
#jai-preview-content h2,
#jai-preview-content h3,
#jai-preview-content h4 {
    color: #0B3D91;
    margin-top: 16px;
    margin-bottom: 9px;
}

#jai-preview-content p {
    margin-bottom: 9px;
}

#jai-preview-content ul,
#jai-preview-content ol {
    margin-left: 22px;
    margin-bottom: 12px;
}

#jai-preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
}

#jai-preview-content table,
#jai-preview-content th,
#jai-preview-content td {
    border: 1px solid #cccccc;
}

#jai-preview-content th,
#jai-preview-content td {
    padding: 7px;
    text-align: left;
}

#jai-preview-content img {
    max-width: 100%;
    height: auto;
}

.jai-empty-preview {
    color: #777;
    text-align: center;
    padding: 90px 10px;
    font-weight: 700;
}

.jai-pdf-render-area {
    position: fixed;
    left: -99999px;
    top: 0;
    width: 794px;
    background: #ffffff;
    color: #111111;
    box-sizing: border-box;
    z-index: -1;
    overflow: visible;
}

.jai-pdf-render-area * {
    box-sizing: border-box;
}

.jai-pdf-render-area a {
    color: #111111;
    text-decoration: none;
}

.jai-pdf-render-area table {
    width: 100%;
    border-collapse: collapse;
}

.jai-pdf-render-area table,
.jai-pdf-render-area th,
.jai-pdf-render-area td {
    border: 1px solid #cccccc;
}

.jai-pdf-render-area th,
.jai-pdf-render-area td {
    padding: 7px;
}

.jai-pdf-render-area img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .jai-tool-container {
        padding: 10px;
    }

    .jai-tool-hero {
        padding: 30px 18px;
        border-radius: 16px;
    }

    .jai-tool-hero h1 {
        font-size: 28px;
    }

    .jai-tool-hero p {
        font-size: 15px;
    }

    .jai-tool-box {
        padding: 18px;
        border-radius: 16px;
    }

    .jai-drop-zone {
        padding: 26px 14px;
    }

    .jai-action-row {
        flex-direction: column;
    }

    .jai-action-row button {
        width: 100%;
    }

    .jai-preview-area {
        padding: 16px;
    }
}