/* === Modern Card Selection System (Context7 Latest Trends) === */

/* CSS Variables for Consistent Theming */
:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    /* 경계선 대비를 높여 카드 윤곽선을 또렷하게 */
    --glass-border: rgba(203, 213, 225, 0.75);
    /* 그림자 농도와 퍼짐을 줄여 더 가볍게 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.25);
    --animation-speed: 0.3s;
    --stagger-delay: 0.1s;
}

/* === Template Dropdown Styles === */
#quote-template-dropdown-menu {
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    z-index: 9999 !important;
    max-height: 240px !important;
    overflow-y: auto !important;
    position: absolute !important;
    width: 450px !important;
    margin-top: 4px !important;
}

#quote-template-dropdown-menu .template-item {
    padding: 12px 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

#quote-template-dropdown-menu .template-item:hover {
    background-color: #f9fafb !important;
}

#quote-template-dropdown-menu .template-item:last-child {
    border-bottom: none !important;
}

#quote-template-dropdown-menu .template-title {
    font-weight: 500 !important;
    color: #111827 !important;
    font-size: 14px !important;
    margin-bottom: 4px !important;
}

#quote-template-dropdown-menu .template-preview {
    color: #6b7280 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

#quote-template-dropdown-btn {
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 120px !important;
}

#quote-template-dropdown-btn:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
}

#quote-template-dropdown-btn:focus {
    outline: none !important;
    border-color: var(--color-primary-500) !important;
    box-shadow: 0 0 0 3px var(--color-primary-100) !important;
}

/* === Quote Reply Content Textarea === */
#quote-reply-content {
    min-height: 12rem !important;
    line-height: 1.6 !important;
}

/* === Modern Step Card System === */
.step-card {
    position: relative;
    cursor: pointer;
    transition: all var(--animation-speed) cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    
    /* Glass Morphism Base */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    
    /* Modern Shadow System */
    box-shadow: 
        var(--shadow-sm),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    scroll-margin: 0 !important;
    scroll-snap-margin: 0 !important;
}

/* Hide inputs completely but keep accessible */
.step-card input[type="checkbox"],
.step-card input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Hover States === */
.step-card:hover {
    transform: translateY(-1px) scale(1.01);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 
        var(--shadow-md),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* === Focus States (Keyboard Navigation) === */
.step-card:focus-within {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* === Active/Pressed States === */
.step-card:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}

/* === Selected States (has[:checked] Magic) === */
.step-card:has(input:checked) {
    border-color: var(--color-primary-500);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(29, 78, 216, 0.05) 100%);
    transform: translateY(-4px) scale(1.03);
    
    /* Advanced Shadow System */
    box-shadow: 
        0 0 0 2px rgba(59, 130, 246, 0.15),
        var(--shadow-glow),
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Icon container enhancement for selected state */
.step-card:has(input:checked) .icon-container {
    background: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Text enhancement for selected state */
.step-card:has(input:checked) h4,
.step-card:has(input:checked) p {
    color: #1e40af;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* === Clean Selection System (No Icons) === */
/* Selection is indicated purely through glow effects and background changes */

/* === Game Card Variations === */
.game-card {
    position: relative;
    cursor: pointer;
    transition: all var(--animation-speed) cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    
    /* Glass Morphism */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.game-card input[type="checkbox"],
.game-card input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.game-card:hover {
    transform: translateY(-1px) scale(1.01);
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 
        var(--shadow-md),
        0 0 0 1px rgba(139, 92, 246, 0.1);
}

.game-card:focus-within {
    outline: 2px solid var(--color-secondary-500);
    outline-offset: 2px;
}

.game-card:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

/* Game card selected state */
.game-card:has(input:checked) {
    border-color: var(--color-secondary-500);
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(124, 58, 237, 0.05) 100%);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 
        0 0 0 2px rgba(139, 92, 246, 0.15),
        0 0 15px rgba(139, 92, 246, 0.3),
        var(--shadow-lg);
}

.game-card:has(input:checked) .game-icon {
    background: rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.game-card:has(input:checked) h4,
.game-card:has(input:checked) h5,
.game-card:has(input:checked) p {
    color: #7c3aed;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Clean game card selection - no checkmark icons needed */

/* === Stagger Animation for Card Containers === */
.cards-container {
    animation: fadeInUp 0.8s ease-out;
}

.cards-container > * {
    animation: fadeInStagger 0.6s ease-out both;
}

.cards-container > *:nth-child(1) { animation-delay: 0.1s; }
.cards-container > *:nth-child(2) { animation-delay: 0.2s; }
.cards-container > *:nth-child(3) { animation-delay: 0.3s; }
.cards-container > *:nth-child(4) { animation-delay: 0.4s; }
.cards-container > *:nth-child(5) { animation-delay: 0.5s; }
.cards-container > *:nth-child(6) { animation-delay: 0.6s; }

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

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Motion Safe Preferences === */
@media (prefers-reduced-motion: no-preference) {
    .step-card,
    .game-card {
        transition: none;
        animation: none;
    }
    
    .cards-container,
    .cards-container > * {
        animation: none;
    }
}

/* === Enhanced Glass Morphism for Icon Containers === */
.icon-container,
.game-icon {
    transition: all var(--animation-speed) ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* === Improved Typography Contrast === */
.step-card h4,
.game-card h4 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

.step-card p,
.game-card p {
    opacity: 0.8;
    font-weight: 500;
}

/* === Dark Mode Support - Disabled === */
@media (prefers-color-scheme: never) {
    :root {
        --glass-bg: rgba(15, 23, 42, 0.8);
        --glass-border: rgba(255, 255, 255, 0.1);
        --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
        --text-primary-dark: #f1f5f9;
        --text-secondary-dark: #cbd5e1;
        --bg-primary-dark: #0f172a;
        --bg-secondary-dark: #1e293b;
        --border-dark: #334155;
    }
    
    /* Body ?크 모드 */
    body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
        color: var(--text-primary-dark);
    }
    
    /* Step ?Game 카드 */
    .step-card,
    .game-card {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        color: var(--text-primary-dark);
    }
    
    .step-card:hover,
    .game-card:hover {
        background: rgba(30, 41, 59, 0.9);
        border-color: rgba(59, 130, 246, 0.4);
    }
    
    .step-card h4,
    .step-card p,
    .game-card h4,
    .game-card h5,
    .game-card p {
        color: var(--text-primary-dark);
    }
    
    /* 견적 ?테???션 */
    .quote-detail-section {
        background: var(--bg-secondary-dark);
        border-color: var(--border-dark);
        color: var(--text-primary-dark);
    }
    
    .quote-detail-section:hover {
        background: rgba(30, 41, 59, 0.9);
    }
    
    /* 견적 ?보 ?벨??*/
    .quote-info-label {
        color: var(--text-secondary-dark);
    }
    
    .quote-info-value {
        color: var(--text-primary-dark);
    }
    
    /* 견적 ?펙 ?이??*/
    .quote-spec-item {
        background: rgba(15, 23, 42, 0.6);
        border-color: var(--border-dark);
        color: var(--text-primary-dark);
    }
    
    .quote-spec-item:hover {
        background: rgba(15, 23, 42, 0.8);
    }
    
    /* ?그 ?크 모드 */
    .quote-tag {
        background: var(--bg-secondary-dark);
        color: var(--text-primary-dark);
        border-color: var(--border-dark);
    }
    
    .quote-tag-blue {
        background: rgba(59, 130, 246, 0.2);
        color: #93c5fd;
        border-color: rgba(59, 130, 246, 0.3);
    }
    
    .quote-tag-green {
        background: rgba(34, 197, 94, 0.2);
        color: #86efac;
        border-color: rgba(34, 197, 94, 0.3);
    }
    
    .quote-tag-purple {
        background: rgba(139, 92, 246, 0.2);
        color: #c4b5fd;
        border-color: rgba(139, 92, 246, 0.3);
    }
    
    /* 모달 ?크롤바 ?크 모드 */
    .modal-scroll::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.3);
    }
    
    .modal-scroll::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.5);
    }
    
    .modal-scroll::-webkit-scrollbar-thumb:hover {
        background: rgba(148, 163, 184, 0.7);
    }
}

/* === Quote List Specific Styles === */
.quote-table {
    width: 100%;
    border-collapse: collapse;
}

/* 내부 구분선 얇게 (AS와 유사한 느낌) */
.quote-table th,
.quote-table td {
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.quote-table thead th {
    border-bottom-color: rgba(203, 213, 225, 0.9);
}

.quote-table th,
.quote-table td {
    text-align: left;
    vertical-align: middle;
}

.quote-table .col-id {
    width: 80px;
}

.quote-table .col-title {
    width: auto;
    min-width: 300px;
}

.quote-table .col-author {
    width: 160px;
    min-width: 160px;
}

.quote-table .col-date {
    width: 120px;
}

.quote-table .col-reply {
    width: 96px;
    min-width: 84px;
}

.truncate-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Modal Styles === */
.modal-scroll {
    overflow-y: auto;
}

.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* === Quote Detail Modal Enhancements === */

/* Quote detail section consistent styling */
.quote-detail-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.quote-detail-section:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Section headers with icons */
.quote-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.quote-detail-header svg {
    flex-shrink: 0;
    margin-right: 0.5rem;
}

/* Basic info grid layout */
.quote-basic-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quote-info-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quote-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.quote-info-item:last-child {
    border-bottom: none;
}

.quote-info-label {
    font-weight: 500;
    color: #6B7280;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.quote-info-value {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
    text-align: right;
    margin-left: 1rem;
}

/* Specification cards */
.quote-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quote-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 0.5rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.2s ease;
}

.quote-spec-item:hover {
    background: rgba(243, 244, 246, 0.9);
    transform: translateY(-1px);
}

/* Tag styling for usage, games, and options */
.quote-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quote-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tag color variants */
.quote-tag-blue {
    background-color: rgba(255, 247, 237, 0.8);
    color: #9a3412;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.quote-tag-green {
    background-color: rgba(236, 253, 245, 0.8);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.quote-tag-purple {
    background-color: rgba(245, 245, 244, 0.8);
    color: #44403c;
    border: 1px solid rgba(87, 83, 78, 0.2);
}

/* Details text area */
.quote-details-content {
    background: rgba(249, 250, 251, 0.8);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    line-height: 1.6;
    font-size: 0.875rem;
    color: #374151;
}

/* Image grid enhancements */
.quote-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .quote-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.quote-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.5);
    background: rgba(249, 250, 251, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.quote-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quote-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.quote-image-item:hover img {
    transform: scale(1.05);
}

.quote-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.quote-image-item:hover .quote-image-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.quote-image-overlay svg {
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.quote-image-item:hover .quote-image-overlay svg {
    opacity: 1;
}

.quote-image-filename {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #6B7280;
    padding: 0 0.25rem;
}

.quote-image-filename div {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quote-basic-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quote-spec-grid {
        grid-template-columns: 1fr;
    }
    
    .quote-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .quote-info-value {
        margin-left: 0;
        text-align: left;
    }
    
    .quote-spec-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        text-align: left;
    }
}

/* === Mobile Quote List Title Size Adjustment === */
@media (max-width: 768px) {
    /* 모바일 카드 리스트의 제목 크기를 줄여 가독성 개선 */
    #mobile-quote-list h4 {
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        line-height: 1.35 !important;
    }
}

/* Status badge styling */
.quote-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Animation for sections */
.quote-detail-section {
    animation: fadeInSection 0.6s ease-out both;
}

.quote-detail-section:nth-child(1) { animation-delay: 0.1s; }
.quote-detail-section:nth-child(2) { animation-delay: 0.2s; }
.quote-detail-section:nth-child(3) { animation-delay: 0.3s; }
.quote-detail-section:nth-child(4) { animation-delay: 0.4s; }
.quote-detail-section:nth-child(5) { animation-delay: 0.5s; }
.quote-detail-section:nth-child(6) { animation-delay: 0.6s; }

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

/* === Quote Detail Modal Header Buttons === */

/* ?? 버튼 ???링 */
#delete-quote-btn {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

#delete-quote-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

#delete-quote-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

#delete-quote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#delete-quote-btn:disabled:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: none;
}

/* ?? 버튼 ?팁 ?과 */
#delete-quote-btn::before {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

#delete-quote-btn:hover::before {
    opacity: 1;
}

/* 모달 ?더 버튼 공통 ????*/
.quote-detail-modal .modal-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.quote-detail-modal .modal-header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quote-detail-modal .modal-header-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ?기 버튼 ???링 */
.quote-detail-modal .close-btn:hover {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.2);
}

/* === Quote Detail Modal Size Adjustments === */

/* 모달 ?기 반응??조정 */
#quote-detail-modal .bg-white {
    width: 95%;
    max-width: none;
}

/* ?면 ?기?모달 최? ?비 ?정 */
@media (min-width: 640px) {
    #quote-detail-modal .bg-white {
        width: 90%;
        max-width: 600px;
    }
}

@media (min-width: 768px) {
    #quote-detail-modal .bg-white {
        width: 88%;
        max-width: 800px;
    }
}

@media (min-width: 1024px) {
    #quote-detail-modal .bg-white {
        width: 85%;
        max-width: 1000px;
    }
}

@media (min-width: 1280px) {
    #quote-detail-modal .bg-white {
        width: 80%;
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    #quote-detail-modal .bg-white {
        width: 75%;
        max-width: 1400px;
    }
}

@media (min-width: 1920px) {
    #quote-detail-modal .bg-white {
        width: 70%;
        max-width: 1600px;
    }
}

/* 모달 ?? 콘텐?최적??*/
#quote-detail-modal .quote-basic-info {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

#quote-detail-modal .quote-spec-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

#quote-detail-modal .quote-image-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

@media (min-width: 1024px) {
    #quote-detail-modal .quote-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 1280px) {
    #quote-detail-modal .quote-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* === ??(??) 카드 ????개선 === */
.quote-reply-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.quote-reply-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease-in-out;
}

.quote-reply-header {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.quote-reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quote-admin-badge {
    padding: 0.25rem 0.5rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.quote-reply-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.quote-reply-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quote-reply-images {
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* === ?세보기 ?용 ?션 ????개선 === */
.quote-details-content {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.quote-details-content p {
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    margin: 0;
}

/* === ?? 모달?서 그리??최적??=== */
@media (min-width: 1024px) {
    .quote-detail-section .grid {
        gap: 1.5rem;
    }
    
    .quote-reply-images .grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .quote-reply-images .grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}

@media (min-width: 1536px) {
    .quote-reply-images .grid {
        grid-template-columns: repeat(14, minmax(0, 1fr));
    }
}

/* 모달 ?기 ?반응??*/
@media (min-width: 640px) {
    #quote-detail-modal .max-w-7xl {
        max-width: 95vw;
    }
}

@media (min-width: 768px) {
    #quote-detail-modal .max-w-7xl {
        max-width: 800px;
    }
}

@media (min-width: 1024px) {
    #quote-detail-modal .max-w-7xl {
        max-width: 1000px;
    }
}

@media (min-width: 1280px) {
    #quote-detail-modal .max-w-7xl {
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    #quote-detail-modal .max-w-7xl {
        max-width: 1400px;
    }
}

@media (min-width: 1920px) {
    #quote-detail-modal .max-w-7xl {
        max-width: 1600px;
    }
}

/* ?? ?션 ?체 ???용 */
#replies-container {
    width: 100%;
    max-width: none;
}

#reply-form {
    width: 100%;
    max-width: none;
}

/* ?? 카드 ????개선 */
.reply-card-modern {
    width: 100%;
    max-width: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
}

/* ?반 ?용???? 카드 */
.reply-card-modern:not([data-admin="true"]) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

/* 관리자 ?? 카드 */
.reply-card-modern[data-admin="true"] {
  background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-primary-100) 100%) !important;
  border-left: 4px solid var(--color-primary-500) !important;
  border-top: 1px solid var(--color-primary-300) !important;
  border-right: 1px solid var(--color-primary-300) !important;
  border-bottom: 1px solid var(--color-primary-300) !important;
}

.reply-card-modern:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* ?세 ?청?항 ??개선 */
.quote-details-content {
    width: 100%;
    max-width: none;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--color-primary-500);
}

.quote-details-content p {
    line-height: 1.7;
    color: #374151;
    margin: 0;
}

/* ?? ??지 그리??개선 */
.reply-image-grid {
    display: grid;
    gap: 12px;
    width: 100%;
}

@media (min-width: 640px) {
    .reply-image-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 768px) {
    .reply-image-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 1024px) {
    .reply-image-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (min-width: 1280px) {
    .reply-image-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

@media (min-width: 1536px) {
    .reply-image-grid {
        grid-template-columns: repeat(14, 1fr);
    }
}

/* ??지 ?버 ?과 개선 */
.image-hover-effect {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.image-hover-effect:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-hover-effect img {
    transition: transform 0.2s ease-in-out;
}

.image-hover-effect:hover img {
    transform: scale(1.05);
}

/* ?? ?성 ??????개선 */
.reply-form-container {
    width: 100%;
    max-width: none;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ?로???역 ????개선 */
.upload-zone {
    transition: all 0.2s ease-in-out;
    border: 2px dashed #cbd5e1;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.upload-zone:hover {
    border-color: var(--color-primary-500);
    background: linear-gradient(135deg, var(--color-primary-100) 0%, var(--color-primary-50) 100%);
    transform: translateY(-1px);
}

.paste-zone {
    transition: all 0.2s ease-in-out;
    border: 2px dashed #cbd5e1;
    background: linear-gradient(135deg, #f0fdf4 0%, #f7fee7 100%);
}

.paste-zone:hover {
    border-color: #22c55e;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    transform: translateY(-1px);
}

.paste-zone:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* ??지 미리보기 그리??????*/
.image-preview-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

@media (min-width: 768px) {
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (min-width: 1024px) {
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

/* 추? 반응?????틸리티 */
.w-full-important {
    width: 100% !important;
    max-width: none !important;
}

.max-w-none-important {
    max-width: none !important;
}

/* ?크롤바 ????개선 */
#quote-detail-modal .overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

#quote-detail-modal .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#quote-detail-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#quote-detail-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ?스??가?성 개선 */
.prose-enhanced {
    line-height: 1.8;
    color: #374151;
}

.prose-enhanced p {
    margin-bottom: 1rem;
}

.prose-enhanced p:last-child {
    margin-bottom: 0;
}
