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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Page Management */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    width: 24px;
    height: 24px;
}

.logo span {
    font-size: 16px;
    font-weight: 600;
    color: #4285f4;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: #f1f3f4;
    color: #333;
}

.nav-item i {
    font-size: 16px;
}

.nav-item.jayoo-link {
    background: #279AFF;
    color: white;
    border: 1px solid #1e88e5;
    border-radius: 8px;
    padding: 16px 24px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.nav-item.jayoo-link:hover {
    background: #1e88e5;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.jayoo-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 26px;
    position: relative;
}

.jayoo-logo img {
    width: 100px;
    height: 26px;
    object-fit: contain;
}

.jayoo-text {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: #2d5a2d;
}

.link-icon {
    font-size: 18px;
    color: white;
    opacity: 0.8;
}

.nav-item.jayoo-link:hover .link-icon {
    opacity: 1;
    color: white;
}

/* Hero Section - AI 색상 추출 페이지 */
.main-content {
    flex: 1;
    padding: 40px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
}

.hero-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #e91e63;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Container */
.upload-container {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.upload-area {
    background: white;
    border: 3px dashed #4285f4;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #1976d2;
    background-color: #f8fbff;
}

.upload-icon {
    font-size: 64px;
    color: #4285f4;
    margin-bottom: 24px;
}

.upload-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.upload-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.upload-info {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 14px;
    color: #666;
    background: #f1f3f4;
    padding: 6px 12px;
    border-radius: 20px;
}

.upload-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
}

.info-card.orange {
    border-left-color: #ff9800;
}

.info-card.green {
    border-left-color: #4caf50;
}

.info-card.purple {
    border-left-color: #9c27b0;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.orange .card-icon {
    background: #fff3e0;
    color: #ff9800;
}

.green .card-icon {
    background: #e8f5e8;
    color: #4caf50;
}

.purple .card-icon {
    background: #f3e5f5;
    color: #9c27b0;
}

.card-icon i {
    font-size: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.card-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.card-content p {
    margin-bottom: 8px;
}

/* Tools Page Styles */
.tools-main {
    flex: 1;
    padding: 40px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tools-hero {
    text-align: center;
    margin-bottom: 60px;
}

.tools-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.tools-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.tools-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
    text-align: left;
}

.feature-item i {
    font-size: 20px;
    color: #4285f4;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 14px;
    color: #666;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #e3f2fd;
}

/* Disabled tool card styles */
.tool-card.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.tool-card.disabled:hover {
    transform: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Disabled nav item styles */
.nav-item.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.nav-item.disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

.tool-icon.red {
    background: linear-gradient(135deg, #ff5252, #f44336);
}

.tool-icon.yellow {
    background: linear-gradient(135deg, #ffeb3b, #ff9800);
}

.tool-icon.blue {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.tool-icon.pink {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

.tool-icon.blue-light {
    background: linear-gradient(135deg, #03a9f4, #0288d1);
}

.tool-icon.gray {
    background: linear-gradient(135deg, #607d8b, #455a64);
}

.tool-icon.purple {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.tool-icon.teal {
    background: linear-gradient(135deg, #009688, #00695c);
}

.tool-icon i {
    font-size: 28px;
}

.tool-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.tool-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.format-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.format-info p {
    font-size: 14px;
    color: #495057;
    margin: 4px 0;
    line-height: 1.4;
}

.format-info p:first-child {
    margin-top: 0;
}

.format-info p:last-child {
    margin-bottom: 0;
}

.format-info strong {
    color: #333;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .main-content,
    .tools-main {
        padding: 24px 16px;
    }

    .hero-title,
    .tools-title {
        font-size: 28px;
    }

    .hero-subtitle,
    .tools-subtitle {
        font-size: 16px;
    }

    .upload-area {
        padding: 40px 24px;
    }

    .upload-title {
        font-size: 20px;
    }

    .upload-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-card {
        padding: 20px;
    }

    .tools-features {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tool-card {
        padding: 20px;
    }
    
    .format-info {
        padding: 10px;
    }
    
    .format-info p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        font-size: 36px;
    }

    .upload-icon {
        font-size: 48px;
    }

    .upload-btn {
        padding: 14px 24px;
        font-size: 14px;
    }

    .tool-icon {
        width: 56px;
        height: 56px;
    }

    .tool-icon i {
        font-size: 24px;
    }
}

/* Animation for page transitions */
.page {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 실행 결과 섹션 - 개선된 디자인 */
.execution-result-section {
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(80, 200, 120, 0.1) 100%);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.execution-result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4A90E2, #50C878, #4A90E2);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.execution-result-section h4 {
    color: #000000;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.execution-result-section h4 i {
    color: #4A90E2;
    font-size: 1.1em;
}

.command-info {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.command-line {
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    transition: transform 0.2s ease;
}

.command-line:hover {
    transform: translateY(-1px);
}

.command-text {
    background: rgba(0, 0, 0, 0.6);
    color: #90EE90;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Courier New', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', monospace;
    font-size: 0.9em;
    word-break: break-all;
    border: 1px solid rgba(144, 238, 144, 0.2);
    text-shadow: 0 0 5px rgba(144, 238, 144, 0.3);
}

.command-output {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 16px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Courier New', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.command-output::-webkit-scrollbar {
    width: 8px;
}

.command-output::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.command-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.command-output::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.stdout {
    border-left: 4px solid #4CAF50;
    color: #90EE90;
    background: rgba(76, 175, 80, 0.1);
}

.stderr {
    border-left: 4px solid #f44336;
    color: #ffcccb;
    background: rgba(244, 67, 54, 0.1);
}

.processing-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4A90E2, #50C878);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #4CAF50;
    display: block;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85em;
    color: #cccccc;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.return-code {
    margin: 16px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
    border-radius: 10px;
    border-left: 4px solid #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.success-code {
    color: #4CAF50;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.error-code {
    color: #f44336;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(244, 67, 54, 0.3);
}

.stdout-section, .stderr-section {
    margin: 16px 0;
    padding: 4px 0;
}

.stdout-section strong, .stderr-section strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 600;
}

.stdout-section strong i {
    color: #4CAF50;
}

.stderr-section strong i {
    color: #f44336;
}

/* JSON 내용 섹션 - 개선된 디자인 */
.json-content-section {
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1) 0%, rgba(233, 30, 99, 0.1) 100%);
    border: 1px solid rgba(156, 39, 176, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.json-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9C27B0, #E91E63, #9C27B0);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.json-content-section h4 {
    color: #000000;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.json-content-section h4 i {
    color: #9C27B0;
    font-size: 1.1em;
}

.json-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.json-toggle-btn, .json-copy-btn, .json-format-btn, .json-expand-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.json-toggle-btn::before, .json-copy-btn::before, .json-format-btn::before, .json-expand-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.json-toggle-btn:hover::before, .json-copy-btn:hover::before, .json-format-btn:hover::before, .json-expand-btn:hover::before {
    left: 100%;
}

.json-toggle-btn:hover, .json-copy-btn:hover, .json-format-btn:hover, .json-expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(156, 39, 176, 0.4);
}

.json-toggle-btn.active {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.json-search {
    margin-bottom: 20px;
    position: relative;
}

.json-search-input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid rgba(156, 39, 176, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 0.95em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.json-search-input:focus {
    outline: none;
    border-color: #9C27B0;
    box-shadow: 0 0 20px rgba(156, 39, 176, 0.3);
}

.json-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.json-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9C27B0;
    font-size: 1.1em;
}

.json-display {
    background: #ffffff;
    color: #000000;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    position: relative;
}

/* JSON label removed for cleaner look */

.json-display::-webkit-scrollbar {
    width: 8px;
}

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

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

.json-display::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.json-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.json-stats > div {
    text-align: center;
    padding: 16px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(156, 39, 176, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.json-stats > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #9C27B0, #E91E63);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.json-stats > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(156, 39, 176, 0.3);
}

.json-stats > div:hover::before {
    transform: scaleX(1);
}

.json-stat-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #E91E63;
    display: block;
    text-shadow: 0 0 10px rgba(233, 30, 99, 0.3);
    margin-bottom: 4px;
}

.json-stat-label {
    font-size: 0.85em;
    color: #cccccc;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* JSON 구문 강조 - 개선된 색상 */
.json-key { 
    color: #79C0FF; 
    font-weight: 600;
    text-shadow: 0 0 5px rgba(121, 192, 255, 0.3);
}

.json-string { 
    color: #A5D6FF; 
    font-style: italic;
}

.json-number { 
    color: #79C0FF; 
    font-weight: 500;
}

.json-boolean { 
    color: #FFA657; 
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 166, 87, 0.3);
}

.json-null { 
    color: #FF7B72; 
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 123, 114, 0.3);
}

.json-punctuation { 
    color: #F1F8FF; 
    font-weight: 500;
}

.json-highlight { 
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1e1e1e; 
    padding: 3px 6px; 
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6); }
}

/* 실패 상태 표시 개선 */
.conversion-result-container.failure {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(255, 87, 34, 0.1) 100%);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.conversion-result-container.failure::before {
    background: linear-gradient(90deg, #f44336, #ff5722, #f44336);
}

.failure-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .failure-summary {
        grid-template-columns: 1fr;
    }
}

.error-info {
    background: rgba(244, 67, 54, 0.1);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.error-message {
    margin-top: 12px;
}

.error-text {
    background: rgba(0, 0, 0, 0.6);
    color: #ffcccb;
    padding: 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.failure-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.retry-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.4);
}

.troubleshooting {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
}

.troubleshooting h4 {
    color: #FFC107;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.troubleshooting li {
    padding: 8px 0;
    color: #ffffff;
    position: relative;
    padding-left: 20px;
}

.troubleshooting li::before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 8px;
}

.page[style*="display: none"] {
    opacity: 0;
}

/* Loading state */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(66, 133, 244, 0.3);
    border-radius: 50%;
    border-top-color: #4285f4;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Drag and drop states */
.upload-area.dragover {
    border-color: #1976d2;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

/* Focus states for accessibility */
.upload-btn:focus,
.tool-card:focus,
.nav-item:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* Document Text Extraction Styles */
.extract-options-container,
.conversion-result-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 40px auto;
    max-width: 1050px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.extract-options-container h3,
.conversion-result-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.file-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.file-info p {
    margin: 4px 0;
    font-size: 14px;
}

.extract-format-selection {
    margin-bottom: 20px;
}

.extract-format-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.format-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.format-select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.extract-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.extract-btn,
.cancel-btn,
.download-converted-btn,
.new-conversion-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.extract-btn {
    background: #4285f4;
    color: white;
    flex: 1;
}

.extract-btn:hover:not(:disabled) {
    background: #1976d2;
    transform: translateY(-1px);
}

.extract-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: #f44336;
    color: white;
    flex: 1;
}

.cancel-btn:hover:not(:disabled) {
    background: #d32f2f;
    transform: translateY(-1px);
}

.download-converted-btn {
    background: #28a745;
    color: white;
    flex: 1;
    min-width: 180px;
}

.download-converted-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.new-conversion-btn {
    background: #90EE90;
    color: #333;
    flex: 1;
}

.new-conversion-btn:hover {
    background: #7FDD7F;
    transform: translateY(-1px);
}

.extract-status {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4285f4, #1976d2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

#statusText {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.conversion-summary {
    margin-bottom: 24px;
}

.file-conversion-info {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.source-file,
.target-file {
    text-align: center;
}

.source-file h4,
.target-file h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
}

.source-file p,
.target-file p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.arrow {
    font-size: 24px;
    color: #4285f4;
    text-align: center;
}

.download-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.command-log {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #4285f4;
}

.command-log h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.command-log code {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', monospace;
    font-size: 13px;
    color: #333;
    display: block;
    word-break: break-all;
}

.command-output {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', monospace;
    font-size: 12px;
    color: #495057;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
}

/* Success and error messages */
.message {
    padding: 16px;
    margin: 16px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.message.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #2196f3;
}

/* Conversion Options Styles */
.conversion-options {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    margin: 24px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.options-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-option,
.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.checkbox-option:hover,
.radio-option:hover {
    background-color: #f8f9fa;
}

.checkbox-option input[type="checkbox"],
.radio-option input[type="radio"] {
    display: none;
}

.checkmark,
.radiomark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.radiomark {
    border-radius: 50%;
}

.checkbox-option input[type="checkbox"]:checked + .checkmark {
    background-color: #4285f4;
    border-color: #4285f4;
}

.checkbox-option input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-option input[type="radio"]:checked + .radiomark {
    background-color: #4285f4;
    border-color: #4285f4;
}

.radio-option input[type="radio"]:checked + .radiomark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.option-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Tool Icon Colors */
.tool-icon.blue {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.tool-icon.green {
    background: linear-gradient(135deg, #34a853, #fbbc04);
}

.tool-icon.orange {
    background: linear-gradient(135deg, #fbbc04, #ea4335);
}

/* PDF Conversion Options and Results */
.pdf-conversion-options-container,
.pdf-conversion-result-container {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    margin: 24px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-conversion-options-container h3,
.pdf-conversion-result-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.conversion-result-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.conversion-result-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
}

.conversion-result-info strong {
    color: #4285f4;
}

/* Responsive Design for Extract UI */
@media (max-width: 768px) {
    .extract-options-container,
    .conversion-result-container {
        margin: 20px auto;
        padding: 20px;
    }

    .file-conversion-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .arrow {
        transform: rotate(90deg);
    }

    .extract-actions,
    .download-section {
        flex-direction: column;
    }

    .extract-btn,
    .cancel-btn,
    .download-converted-btn,
    .new-conversion-btn {
        flex: none;
    }

    .conversion-options {
        margin: 16px;
        padding: 16px;
    }

    .option-group {
        gap: 12px;
    }

    .checkbox-option,
    .radio-option {
        padding: 10px;
    }

    .option-text {
        font-size: 14px;
    }

    .pdf-conversion-options-container,
    .pdf-conversion-result-container {
        margin: 16px;
        padding: 16px;
    }

    .pdf-conversion-options-container h3,
    .pdf-conversion-result-container h3 {
        font-size: 18px;
    }

    .conversion-result-info {
        padding: 12px;
    }

    .conversion-result-info p {
        font-size: 13px;
    }
}

