* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.header-text {
    text-align: center;
    flex: 1;
}

.header-text h1 {
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.header-text p {
    color: #666;
    margin: 0;
}

.support-section {
    display: flex;
    align-items: center;
}

.support-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(45deg, #ff6600, #ff9900);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

.support-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
    background: linear-gradient(45deg, #e55a00, #e68a00);
}

.support-icon {
    font-size: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #ff6600, #ff9900);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px;
}

.upi-section {
    text-align: center;
    margin-bottom: 20px;
}

.upi-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.upi-id-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upi-id-section label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.upi-id-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#upi-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    padding: 8px 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #17a2b8;
}

.qr-section {
    margin: 20px 0;
}

#qr-code {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.amount-suggestions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.amount-suggestions p {
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

.amount-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.amount-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.amount-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.amount-btn.selected {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.thank-you {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.thank-you p {
    color: #28a745;
    font-weight: 600;
    margin: 0;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 600px;
}

.input-section, .output-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-section {
    display: flex;
    flex-direction: column;
}

#json-input {
    flex: 1;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    margin-bottom: 15px;
}

#json-input:focus {
    outline: none;
    border-color: #3498db;
}

.button-group {
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#render-btn {
    background-color: #3498db;
    color: white;
    flex: 1;
}

#render-btn:hover {
    background-color: #2980b9;
}

#clear-btn {
    background-color: #95a5a6;
    color: white;
    flex: 0 0 auto;
}

#clear-btn:hover {
    background-color: #7f8c8d;
}

.output-section h2 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.content-output {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 20px;
    background-color: #fafafa;
}

/* Content Styling */
.content-output h1, .content-output h2, .content-output h3,
.content-output h4, .content-output h5, .content-output h6 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2c3e50;
}

.content-output h1 { font-size: 2em; }
.content-output h2 { font-size: 1.7em; }
.content-output h3 { font-size: 1.4em; }
.content-output h4 { font-size: 1.2em; }
.content-output h5 { font-size: 1.1em; }
.content-output h6 { font-size: 1em; }

.content-output p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.content-output ul, .content-output ol {
    margin-bottom: 16px;
    padding-left: 30px;
}

.content-output li {
    margin-bottom: 8px;
}

.content-output blockquote {
    margin: 16px 0;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    font-style: italic;
}

.content-output blockquote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: 600;
    color: #666;
}

.delimiter {
    text-align: center;
    margin: 30px 0;
    font-size: 18px;
    color: #bdc3c7;
}

.content-output figure {
    margin: 20px 0;
    text-align: center;
}

.content-output img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-output figcaption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
    font-size: 14px;
}

.content-output pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
}

.content-output code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.content-output table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background-color: white;
}

.content-output th, .content-output td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.content-output th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.embed {
    margin: 20px 0;
    text-align: center;
}

.embed iframe {
    max-width: 100%;
    border: none;
    border-radius: 6px;
}

.embed-caption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
    font-size: 14px;
}

.unsupported-block {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 16px 0;
}

.unsupported-block strong {
    color: #856404;
}

.unsupported-block pre {
    background-color: #f8f9fa;
    color: #333;
    margin-top: 10px;
    font-size: 12px;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

.custom-block {
    margin: 10px 0;
}

.validation-error {
    color: #dc3545 !important;
    font-weight: bold;
    background-color: #f8d7da;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

.error-info {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 5px;
    font-size: 0.9em;
}

.no-content {
    text-align: center;
    color: #666;
    font-style: italic;
}

.raw-html {
    border: 2px dashed #ddd;
    padding: 15px;
    margin: 16px 0;
    background-color: #f9f9f9;
}

/* SEO Footer Styles */
.seo-footer {
    margin-top: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-top: 1px solid #dee2e6;
    border-radius: 8px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.footer-content h3 {
    color: #34495e;
    margin: 20px 0 10px 0;
    font-size: 18px;
}

.footer-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.block-types-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.block-types-list li {
    color: #555;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.block-types-list strong {
    color: #2c3e50;
}

.footer-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.footer-links p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .support-button {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .amount-buttons {
        gap: 8px;
    }
    
    .amount-btn {
        min-width: 60px;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    main {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .input-section, .output-section {
        padding: 15px;
    }
    
    #json-input {
        min-height: 200px;
    }
    
    .content-output {
        min-height: 300px;
        max-height: 400px;
    }
}