/* Main Container */
.one-line-converter {
    margin-bottom: 3rem;
}

/* Tool Card */
.tool-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(to right, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    flex: 1;
    min-width: 200px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.action-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.action-btn svg {
    flex-shrink: 0;
}

/* Conversion Controls */
.conversion-controls {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.controls-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.option-item:hover {
    background: #ffffff;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s ease;
}

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

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

.option-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.option-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
}

.option-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.convert-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.convert-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.convert-btn svg {
    flex-shrink: 0;
}

/* Card Body - Two Column Layout */
.card-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 500px;
}

/* Input and Output Panels */
.input-panel,
.output-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
}

.output-panel {
    border-right: none;
    border-left: 1px solid #e2e8f0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.panel-subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
}

/* Editor Wrapper */
.editor-wrapper {
    position: relative;
    flex: 1;
    min-height: 400px;
    background: #ffffff;
}

.code-editor {
    width: 100%;
    height: 100%;
    min-height: 400px;
    font-size: 14px;
    line-height: 1.6;
}

.output-editor {
    background: #fafbfc;
}

/* Panel Footer */
.panel-footer {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.stat-badge svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Output Stats */
.output-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 80px;
}

.stat-card.highlight {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    color: #ffffff;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.stat-card.highlight .stat-value {
    color: #ffffff;
}

.stat-unit {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.stat-card.highlight .stat-unit {
    color: rgba(255, 255, 255, 0.8);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.success .status-dot {
    background: #10b981;
}

.status-indicator.error .status-dot {
    background: #ef4444;
    animation: none;
}

.status-indicator.warning .status-dot {
    background: #f59e0b;
}

.status-text {
    color: #64748b;
    font-weight: 500;
}

.status-indicator.success .status-text {
    color: #10b981;
}

.status-indicator.error .status-text {
    color: #ef4444;
}

.status-indicator.warning .status-text {
    color: #f59e0b;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Info Section */
.info-section {
    margin-top: 2.5rem;
}

.info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.info-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.info-content {
    padding: 1.5rem;
}

.info-description {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-list li {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

.info-tip {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.info-tip svg {
    flex-shrink: 0;
    color: #3b82f6;
    margin-top: 2px;
}

.tip-content {
    flex: 1;
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.6;
}

.tip-content strong {
    font-weight: 600;
    color: #1e3a8a;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .card-header {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-subtitle {
        font-size: 0.875rem;
    }

    .action-btn span {
        display: none;
    }

    .conversion-controls {
        padding: 1rem;
    }

    .card-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .input-panel,
    .output-panel {
        border-right: none;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .output-panel {
        border-bottom: none;
    }

    .editor-wrapper {
        min-height: 300px;
    }

    .code-editor {
        min-height: 300px;
        font-size: 13px;
    }

    .panel-footer {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .output-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-card {
        flex: 1;
        min-width: auto;
    }

    .info-content {
        padding: 1.25rem;
    }

    .info-grid {
        gap: 1rem;
    }

    .info-item {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    .controls-inner {
        flex-direction: row;
        align-items: flex-end;
    }

    .options-group {
        flex: 1;
        flex-direction: row;
    }

    .convert-btn {
        width: auto;
        min-width: 140px;
    }

    .card-body {
        grid-template-columns: 1fr 1fr;
    }

    .editor-wrapper {
        min-height: 450px;
    }

    .code-editor {
        min-height: 450px;
    }

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

@media (min-width: 1024px) {
    .editor-wrapper {
        min-height: 500px;
    }

    .code-editor {
        min-height: 500px;
    }
}

/* Ace Editor Customization */
.ace_editor {
    border-radius: 0;
}

.ace_gutter {
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
}

.ace_gutter-active-line {
    background: #e2e8f0 !important;
}

.ace_scroller {
    background: #ffffff !important;
}

.output-editor .ace_scroller {
    background: #fafbfc !important;
}
