/* JSON Validator Styles */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-icon {
    font-size: 3rem;
    color: inherit;
    display: inline-block;
    margin-right: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tool-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.panel-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.form-section {
    padding: 1.5rem;
}

.json-editor-container {
    position: relative;
}

.json-editor-container textarea {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    background: #f8f9fa;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.json-editor-container textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.editor-info {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-section {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.validation-status {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.status-indicator.ready {
    background: #e2e3e5;
    color: #495057;
}

.status-indicator.valid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.invalid {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 1.5rem;
}

.status-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.result-section,
.error-section {
    padding: 1.5rem;
}

.result-content,
.error-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.error-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    border-radius: 4px;
}

.error-message {
    font-weight: 600;
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.error-location {
    color: #666;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.history-status.valid {
    color: #28a745;
}

.history-status.invalid {
    color: #dc3545;
}

.history-preview {
    font-size: 0.9rem;
    color: #6c757d;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.history-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.no-history {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-style: italic;
}

.info-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.info-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.feature-card p {
    color: #495057;
    line-height: 1.6;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #28a745;
}

.toast-error {
    background: #dc3545;
}

.toast-warning {
    background: #ffc107;
    color: #333;
}

.formatted-json {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-icon {
        font-size: 2rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
        gap: 1rem;
    }

    .panel-actions {
        width: 100%;
        justify-content: space-between;
    }

    .action-section {
        flex-direction: column;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
