/* I Ching Hexagram Search - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


@font-face {
    font-family: 'SourceHan-Serif-Bold-exT';
    src: url('https://cdn.chenzixin.com/fonts/source-han-serif-bold-ext/font/SourceHanSerifBoldexT-B.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

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

/* Header Styles */
.header {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.header h1 {
    font-family: 'SourceHan-Serif-Bold-exT', serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
    padding-top: 20px;
    padding-bottom: 10px;
}

.header-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.3s ease;
}

.header-title-link:hover {
    transform: scale(1.05);
    color: rgb(157, 41, 41);
}

.header p {
    font-size: 1.1rem;
    color: #666;
}

/* Search Box */
.search-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.search-input-wrapper {
    display: flex;
    gap: 15px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: rgb(157, 41, 41);
    box-shadow: 0 0 0 3px rgba(157, 41, 41, 0.1);
}

.search-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    background: rgb(157, 41, 41);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(157, 41, 41, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

.search-btn:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 2px;
}

/* Results Section */
.results {
    display: none;
}

.results.show {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Block Containers */
.block-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 25px;
    margin-bottom: 20px;
}

.main-hexagram-standalone {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    padding: 30px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.main-hexagram-standalone.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    overflow-y: auto; /* Allow vertical scroll */
    overflow-x: hidden; /* Prevent horizontal scroll */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    padding: 40px 20px; /* Add padding for desktop */
    box-sizing: border-box; /* Include padding in width/height */
    background: white; /* Solid white background, no transparency */
}

/* Desktop fullscreen - no scaling, just normal display */
@media (min-width: 769px) {
    .main-hexagram-standalone.fullscreen {
        justify-content: flex-start; /* Start from top on desktop */
        padding-top: 60px; /* More space at top for desktop */
    }
}

/* Mobile fullscreen adjustments - only apply on mobile devices */
@media (max-width: 768px) {
    .main-hexagram-standalone.fullscreen {
        padding: 20px; /* Add padding to prevent edge overflow */
        align-items: center;
        justify-content: center; /* Vertically center content */
        overflow-y: auto; /* Allow vertical scroll on mobile */
        background: white !important; /* Force solid white background on mobile fullscreen */
    }

    .main-hexagram-standalone.fullscreen .hexagram-name {
        font-size: 3rem; /* 2rem * 1.5 = 3rem */
        margin-bottom: 20px; /* Increased from 15px for better spacing */
    }

    .main-hexagram-standalone.fullscreen .hexagram-full-name {
        font-size: 1.95rem; /* 1.3rem * 1.5 = 1.95rem */
        margin-bottom: 25px; /* Increased from 20px for better spacing */
    }

    .main-hexagram-standalone.fullscreen .main-hexagram-drawing {
        margin: 25px 0; /* Increased from 20px for better vertical centering */
    }

    .main-hexagram-standalone.fullscreen .main-hexagram-drawing .line-row {
        width: 180px; /* 120px * 1.5 = 180px */
        height: 18px; /* 12px * 1.5 = 18px */
        margin: 10.5px 0; /* 7px * 1.5 = 10.5px */
    }

    .main-hexagram-standalone.fullscreen .main-hexagram-drawing .yang-line {
        width: 180px;
        height: 18px;
        background: rgb(157, 41, 41); /* Ensure yang line color is solid */
    }

    .main-hexagram-standalone.fullscreen .main-hexagram-drawing .yin-line {
        gap: 36px; /* 24px * 1.5 = 36px */
        width: 180px;
    }

    .main-hexagram-standalone.fullscreen .main-hexagram-drawing .yin-segment {
        width: 72px; /* 48px * 1.5 = 72px */
        height: 18px;
        background: rgb(157, 41, 41); /* Ensure yin line color is solid */
    }

    /* Structure between hexagram and meaning, vertically centered */
    .main-hexagram-standalone.fullscreen .hexagram-structure {
        font-size: 1.65rem; /* 1.1rem * 1.5 = 1.65rem */
        margin: 30px 0; /* Increased from 25px for better vertical centering */
        text-align: center;
    }

    .main-hexagram-standalone.fullscreen .hexagram-meaning {
        font-size: 1.44rem; /* 1.2rem * 1.2 = 1.44rem */
        margin-top: 25px; /* Increased from 20px for better spacing */
    }
}

.main-hexagram-fullname {
    cursor: default; /* Default cursor on desktop */
    user-select: none;
}

/* Show pointer cursor only on mobile where double-tap works */
@media (max-width: 768px) {
    .main-hexagram-fullname {
        cursor: pointer;
    }
}

/* Only show focus outline for keyboard navigation, not mouse clicks */
.main-hexagram-fullname:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 4px;
    border-radius: 4px;
}

.main-hexagram {
    text-align: center;
}

.main-hexagram-drawing {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
}

/* Wrapper for precise click detection - limits to actual hexagram lines area */
.hexagram-lines-wrapper {
    display: inline-block;
    width: fit-content;
    cursor: pointer; /* Only show pointer on actual hexagram lines */
    /* This ensures the wrapper only covers the actual line drawings, not the full container width */
}

/* Clickable hexagram drawing - remove cursor from container, only show on actual lines */
.hexagram-drawing-clickable {
    cursor: default; /* Default cursor on the container (no hand on blank areas) */
    transition: opacity 0.2s;
}

.hexagram-drawing-clickable:hover {
    opacity: 1; /* No opacity change on container hover */
}

.hexagram-drawing-clickable:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Remove ALL link underlines globally */
a {
    text-decoration: none;
    border-bottom: none;
    -webkit-tap-highlight-color: transparent; /* Remove mobile tap highlight */
}

a:hover {
    text-decoration: none;
    border-bottom: none;
}

/* Prevent input from triggering keyboard on mobile when not intended */
.search-input {
    -webkit-user-select: none;
    user-select: none;
}

/* Remove tap highlight from all clickable elements on mobile */
.hexagram-drawing-clickable,
.hexagram-lines-wrapper,
.clickable-hexagram,
.main-hexagram-fullname {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Fullscreen mode - maintain clickable behavior on hexagram lines */
.main-hexagram-standalone.fullscreen .hexagram-drawing-clickable {
    position: relative;
    z-index: 10;
}

/* In fullscreen, only show pointer on the actual hexagram lines wrapper */
.main-hexagram-standalone.fullscreen .hexagram-lines-wrapper {
    cursor: pointer;
}

/* Card hexagram images - clickable with pointer cursor */
.clickable-hexagram {
    cursor: pointer;
    transition: opacity 0.2s;
}

.clickable-hexagram:hover {
    opacity: 0.7;
}

/* Larger lines for main hexagram */
.main-hexagram-drawing .line-row {
    width: 120px;
    height: 12px;
    margin: 7px 0;
}

.main-hexagram-drawing .yang-line {
    width: 120px;
    height: 12px;
}

.main-hexagram-drawing .yin-line {
    gap: 24px;
    width: 120px;
}

.main-hexagram-drawing .yin-segment {
    width: 48px;
    height: 12px;
}

.hexagram-name {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.hexagram-name a {
    color: rgb(157, 41, 41);
}

.card-name a {
    color: #333;
}

.card-name a:hover {
    color: rgb(157, 41, 41);
}

.bian-name a {
    color: #333;
}

.bian-name a:hover {
    color: rgb(157, 41, 41);
}

.hexagram-full-name {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 10px;
}

.hexagram-structure {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 15px;
}

.hexagram-meaning {
    font-size: 1.2rem;
    color: #555;
    display: inline-block;
}

/* Edit and Login Icons */
.edit-icon, .login-icon {
    display: inline-block;
    margin-left: 10px;
    cursor: pointer;
    color: rgb(157, 41, 41);
    font-size: 1.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.edit-icon:hover, .login-icon:hover {
    color: rgb(130, 35, 35);
    transform: scale(1.1);
}

.edit-icon:focus-visible, .login-icon:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Header Icons Container */
.header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icons .edit-icon { margin-left: 0; }

/* Generate Analysis Icon */
.generate-icon {
    display: inline-block;
    cursor: pointer;
    color: rgb(157, 41, 41);
    font-size: 1.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.generate-icon:hover {
    color: rgb(130, 35, 35);
    transform: scale(1.1);
}

.generate-icon:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Browse Analysis Icon */
.browse-icon {
    display: inline-block;
    cursor: pointer;
    color: rgb(157, 41, 41);
    font-size: 1.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.browse-icon:hover {
    color: rgb(130, 35, 35);
    transform: scale(1.1);
}

.browse-icon:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgb(157, 41, 41);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast[role="status"] {
    /* Accessibility: status messages */
}

/* Hexagram Lines Display */
.hexagram-lines {
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;
}

.line-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 5px;
    margin: 3px 0;
}

.yang-line {
    width: 60px;
    height: 5px;
    background: rgb(157, 41, 41);
    border-radius: 1px;
}

.yin-line {
    display: flex;
    gap: 12px;
    width: 60px;
}

.yin-segment {
    width: 24px;
    height: 5px;
    background: rgb(157, 41, 41);
    border-radius: 1px;
}

.card-with-hexagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.card-info {
    flex: 1;
}

.card-structure-below {
    font-size: 0.9rem;
    color: #888;
    margin-top: 8px;
}

.hexagram-lines-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 15px;
    height: auto !important;
    min-height: unset !important;
    padding: 5px 0;
}

.hexagram-structure-text {
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

/* Draggable modal */
#generateModal .modal-header {
    cursor: move;
    user-select: none;
}

.modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}

/* Login input fields - shorter height */
#loginModal .modal-textarea {
    min-height: 45px;
    padding: 12px 15px;
    font-size: 1rem;
}

.modal-textarea:focus {
    outline: none;
    border-color: rgb(157, 41, 41);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn:focus-visible {
    outline: 2px solid rgb(157, 41, 41);
    outline-offset: 2px;
}

.modal-btn-cancel {
    background: #f0f0f0;
    color: #333;
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
}

.modal-btn-save {
    background: rgb(157, 41, 41);
    color: white;
}

.modal-btn-save:hover {
    background: rgb(130, 35, 35);
}

/* Generate Analysis Modal */
.generate-modal-row {
    margin-bottom: 20px;
}

/* Radio row: inline labels + radios */
.generate-radio-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}
.generate-radio-row .generate-modal-label {
    display: inline;
    margin-bottom: 0;
    margin-right: 4px;
    font-size: 0.95rem;
}
.generate-radio-row .generate-radio-label {
    display: inline-flex;
    margin-right: 6px;
}
/* Gap between 经 and 翼 groups */
.generate-radio-row .generate-radio-label + .generate-modal-label {
    margin-left: 16px;
}
/* Prevent wrap on mobile */
@media (max-width: 480px) {
    .generate-radio-row {
        flex-wrap: nowrap;
    }
}

.generate-modal-label {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.generate-yao-selects {
    display: flex;
    gap: 12px;
}

.generate-select {
    flex: 1;
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s;
}

.generate-select:focus {
    outline: none;
    border-color: rgb(157, 41, 41);
    box-shadow: 0 0 0 3px rgba(157, 41, 41, 0.1);
}

.generate-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.generate-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
}

.generate-radio-label input[type="radio"] {
    accent-color: rgb(157, 41, 41);
    width: 18px;
    height: 18px;
}

.generate-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.generate-textarea:focus {
    outline: none;
    border-color: rgb(157, 41, 41);
    box-shadow: 0 0 0 3px rgba(157, 41, 41, 0.1);
}

/* Transformations Section */
.transformations {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-left: -6px;
}
.section-title i {
    color: rgb(157, 41, 41);
    margin-right: 8px;
    font-size: 1.3rem;
}

/* Subsection title for 基本变换 / 六爻变换 */
.subsection-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: #444;
    margin-top: 20px;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid rgb(157, 41, 41);
}

.bian-section-title {
    margin-top: 20px;
    margin-bottom: 12px;
}

.transformation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.transformation-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border: 2px solid transparent;
    transition: all 0.3s;
    min-height: 120px;
}

.transformation-card:hover {
    border-color: rgb(157, 41, 41);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(157, 41, 41, 0.2);
}

.card-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.card-full-name {
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.card-structure {
    font-size: 0.9rem;
    color: #888;
}

.bian-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.bian-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid rgb(157, 41, 41);
    min-height: 100px;
}

.bian-position {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.bian-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.bian-full-name {
    font-size: 0.9rem;
    color: #666;
}

/* Error and Loading States */
.error-message {
    background: #fee;
    color: #c33;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.9rem;
}

.footer a {
    color: rgb(157, 41, 41);
}

.footer a:hover {
    color: rgb(130, 35, 35);
}

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

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .transformation-grid {
        grid-template-columns: 1fr;
    }

    .bian-list {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Overlay - Frosted Glass Effect */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 245, 0.7); /* Light gray with transparency */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    z-index: 3000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    max-height: calc(100vh - 200px);
    overflow: hidden;
}

.lightbox-image-container img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-image-container {
        padding: 15px;
        max-height: calc(100vh - 150px);
    }
}

/* ─── Browse Analysis Modal ─────────────────────────────────────── */

/* ─── Confirm Dialog ────────────────────────────────────────────── */

#confirmModal { z-index: 1500; }

.confirm-dialog {
    max-width: 400px;
    text-align: center;
}

.confirm-message {
    font-size: 1.1rem;
    color: #333;
    padding: 20px 0;
    line-height: 1.8;
}

/* ─── Browse Table (Bootstrap inspired, brand color) ───────────── */

.browse-table-wrap {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 12px;
    border: 1px solid #d4a5a5;
    border-radius: 6px;
}

.browse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.browse-table thead {
    border-bottom: 2px solid #9d2929;
}

.browse-table th {
    padding: 10px 10px;
    color: #9d2929;
    font-weight: 600;
    font-size: 0.85rem;
    background: #fdf7f7;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

.browse-table th:nth-child(1) { width: 38%; }
.browse-table th:nth-child(2) { width: 18%; text-align: center; }
.browse-table th:nth-child(3) { width: 44%; text-align: center; }

.browse-table td {
    padding: 10px 8px;
    color: #444;
    border-bottom: 1px solid #f0e0e0;
    vertical-align: middle;
}

.browse-table td:nth-child(2) { text-align: center; }
.browse-table td:nth-child(3) { text-align: center; white-space: nowrap; }

.browse-table tbody tr {
    transition: background 0.15s;
}

.browse-table tbody tr:hover {
    background: #fef9f9;
}

.browse-table tbody tr:last-child td {
    border-bottom: none;
}

.browse-table .img-icon {
    font-size: 1.25rem;
    color: #9d2929;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.browse-table .img-icon:hover {
    color: #7a2020;
    transform: scale(1.15);
}

.browse-table .action-icon {
    font-size: 1.05rem;
    cursor: pointer;
    margin: 0 14px;
    transition: color 0.2s, transform 0.2s;
}

.browse-table .action-icon.edit {
    color: #c0392b;
}

.browse-table .action-icon.edit:hover {
    color: #8b0000;
    transform: scale(1.12);
}

.browse-table .action-icon.del {
    color: #c0392b;
}

.browse-table .action-icon.del:hover {
    color: #8b0000;
    transform: scale(1.12);
}

.browse-empty {
    text-align: center;
    color: #aaa;
    padding: 35px 0;
    font-size: 0.95rem;
}

/* ─── Browse Pagination ─────────────────────────────────────────── */

.browse-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

.browse-pagination button {
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #d4a5a5;
    border-radius: 3px;
    background: #fff;
    color: #9d2929;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.browse-pagination button:hover:not(:disabled):not(.active) {
    background: #fdf7f7;
    border-color: #9d2929;
}

.browse-pagination button.active {
    background: #9d2929;
    color: #fff;
    border-color: #9d2929;
    font-weight: 600;
}

.browse-pagination button:disabled {
    opacity: 0.3;
    cursor: default;
}
