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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.header-nav {
    position: absolute;
    top: 0;
    right: 0;
    margin-bottom: 15px;
}

.help-link {
    color: #00ff88;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border: 2px solid #00ff88;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

.help-link:hover {
    background-color: #00ff88;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    max-height: 60px;
    width: auto;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand-text {
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Main Content */
main {
    flex: 1;
    background: #2a2a2a;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid #3a3a3a;
}

/* Input Section */
.input-section {
    margin-bottom: 25px;
}

.input-section h2,
.output-section h2 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #4a4a4a;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

textarea:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

#jsonOutput {
    background-color: #0d0d0d;
    color: #e0e0e0;
}

/* Controls Section */
.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #1a1a1a;
    font-weight: 700;
}

.btn-secondary {
    background: linear-gradient(135deg, #4a4a4a 0%, #666666 100%);
    color: #e0e0e0;
}

.btn-info {
    background: linear-gradient(135deg, #0066cc 0%, #0080ff 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
}

.btn-copy {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #1a1a1a;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
}

/* Output Section */
.output-section {
    margin-bottom: 20px;
}

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

/* Error and Success Messages */
.error-message,
.success-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.error-message {
    background-color: #2d1b1b;
    color: #ff6b6b;
    border: 1px solid #4a2626;
}

.success-message {
    background-color: #1b2d1f;
    color: #00ff88;
    border: 1px solid #264a2e;
}

.error-message.show,
.success-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Validation Status */
.validation-info {
    margin-bottom: 20px;
}

.status-indicator {
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.status-indicator.valid {
    background-color: #1b2d1f;
    color: #00ff88;
    border: 1px solid #264a2e;
    display: block;
}

.status-indicator.invalid {
    background-color: #2d1b1b;
    color: #ff6b6b;
    border: 1px solid #4a2626;
    display: block;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    color: white;
    opacity: 0.8;
}

.brand-link {
    color: #00ff88;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.brand-link:hover {
    color: #00cc6a;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .logo-section {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        max-height: 50px;
    }

    .header-nav {
        position: relative;
        margin-bottom: 20px;
        text-align: center;
    }

    .help-link {
        font-size: 13px;
        padding: 6px 12px;
    }

    main {
        padding: 20px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .output-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    textarea {
        min-height: 150px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    main {
        padding: 15px;
    }

    textarea {
        min-height: 120px;
        font-size: 12px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Dark mode support - already implemented in main styles */
@media (prefers-color-scheme: dark) {
    /* Dark theme is now the default, no overrides needed */
}