* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation Styles */
.navbar {
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #4CAF50;
}

.logo {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    transition: 0.3s;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #4CAF50;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #666;
}

.breadcrumb .current {
    color: #4CAF50;
    font-weight: 500;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Section Management */
.section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.section.active {
    display: block;
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 10px;
    font-weight: 300;
}

.privacy-notice {
    font-size: 1.1rem;
    color: #81C784;
    font-weight: 500;
    background: rgba(76, 175, 80, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-top: 10px;
}

/* Main Content Grid */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
        "input output";
    gap: 30px;
    align-items: start;
}

.input-section {
    grid-area: input;
}

.output-section {
    grid-area: output;
}

/* Content Sections */
.input-section,
.output-section {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    color: #4CAF50;
    font-size: 1.4rem;
    font-weight: 400;
}

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

/* Button Styles */
.primary-btn,
.secondary-btn,
.repair-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.primary-btn {
    background: #4CAF50;
    color: white;
}

.primary-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.repair-btn {
    background: #FF9800;
    color: white;
}

.repair-btn:hover {
    background: #F57C00;
    transform: translateY(-1px);
}

.secondary-btn {
    background: #404040;
    color: #e0e0e0;
    border: 1px solid #555;
}

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

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input and Output Areas */
#jsonInput {
    width: 100%;
    min-height: 200px;
    max-height: 80vh;
    background: #1e1e1e;
    color: #e0e0e0;
    border: 2px solid #404040;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    overflow-y: auto;
}

#jsonInput:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

#jsonInput::placeholder {
    color: #888;
}

.output-area {
    width: 100%;
    min-height: 200px;
    max-height: 80vh;
    background: #1e1e1e;
    border: 2px solid #404040;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    overflow: auto;
    position: relative;
    resize: vertical;
}

.output-area.error {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.05);
}

.output-area.success {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

/* Message Styles */
.error-message {
    color: #ff6b6b;
    font-weight: 500;
    background: rgba(255, 107, 107, 0.1);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ff6b6b;
}

.success-message {
    color: #4CAF50;
    font-weight: 500;
    background: rgba(76, 175, 80, 0.1);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
}

/* JSON Syntax Highlighting */
.json-key {
    color: #8AC7FF;
    font-weight: 500;
}

.json-string {
    color: #90EE90;
}

.json-number {
    color: #FFD700;
}

.json-boolean {
    color: #FF69B4;
    font-weight: 500;
}

.json-null {
    color: #A0A0A0;
    font-style: italic;
}

.json-punctuation {
    color: #FFFFFF;
}

/* Content Wrapper for better ad placement */
.content-wrapper {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
}

.content-wrapper h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Content Sections Styles */
.help-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
}

.feature-card h3 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card ul {
    margin-left: 20px;
    margin-top: 10px;
}

.feature-card li {
    margin-bottom: 5px;
}

/* Examples Section */
.examples-section {
    grid-column: 1 / -1;
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #FF9800;
    margin-top: 20px;
}

.examples-section h3 {
    color: #FF9800;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.example-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.example-btn {
    background: #404040;
    color: #e0e0e0;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.example-btn:hover {
    background: #505050;
    border-color: #FF9800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

/* Guide Styles */
.guide-content {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 12px;
}

.guide-content h3 {
    color: #4CAF50;
    margin: 30px 0 15px 0;
    font-size: 1.3rem;
}

.guide-content h3:first-child {
    margin-top: 0;
}

.guide-content ul {
    margin-left: 20px;
}

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

.guide-content code {
    background: #1e1e1e;
    padding: 2px 6px;
    border-radius: 4px;
    color: #90EE90;
    font-family: 'Courier New', monospace;
}

.code-example {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #404040;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 15px 0;
}

.error-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.error-example {
    background: #252525;
    padding: 15px;
    border-radius: 8px;
}

.error-example h4 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.code-bad {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #ff6b6b;
}

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

.code-bad,
.code-good {
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin: 5px 0;
    display: block;
}

/* Tips Styles */
.tips-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tip-article {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #FF9800;
}

.tip-article h3 {
    color: #FF9800;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.tip-article kbd {
    background: #1e1e1e;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #555;
    font-family: monospace;
    font-size: 0.9em;
}

.tip-article kbd {
    background: #1e1e1e;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #555;
    font-family: monospace;
    font-size: 0.9em;
}

.tip-highlight {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.tip-highlight strong {
    color: #4CAF50;
    display: block;
    margin-bottom: 8px;
}

.tip-highlight ul {
    margin: 8px 0 0 20px;
}

.tip-highlight li {
    margin-bottom: 4px;
}

/* FAQ Styles */
.faq-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #2196F3;
}

.faq-item h3 {
    color: #2196F3;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Privacy Policy Styles */
.privacy-content {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 12px;
}

.privacy-content h3 {
    color: #4CAF50;
    margin: 25px 0 15px 0;
    font-size: 1.3rem;
}

.privacy-content h3:first-child {
    margin-top: 0;
}

/* Footer Styles */
footer {
    margin-top: 60px;
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 30px;
}

.footer-section h4 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #4CAF50;
}

.footer-bottom {
    background: #1e1e1e;
    padding: 20px;
    text-align: center;
    color: #888;
    border-top: 1px solid #404040;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: #2d2d2d;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "input"
            "output";
        gap: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .button-group {
        align-self: stretch;
    }

    .secondary-btn {
        flex: 1;
    }

    #jsonInput,
    .output-area {
        height: 300px;
        min-height: 200px;
    }

    .help-content {
        grid-template-columns: 1fr;
    }

    .error-examples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .privacy-notice {
        font-size: 1rem;
    }

    .input-section,
    .output-section {
        padding: 15px;
    }

    .primary-btn,
    .secondary-btn,
    .repair-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Desktop Layout Optimization */
@media (min-width: 1024px) {
    main {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "input output";
        gap: 30px;
    }
}