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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    padding: 1.25rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.logo svg {
    width: 100%;
    height: 100%;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    text-align: center;
}

/* Main Content */
main {
    padding: 2rem 0;
}

.privacy-notice {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.privacy-notice p {
    margin: 0;
    color: #065f46;
    font-weight: 500;
}

/* Section Styles */
.input-section,
.output-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #0f766e;
}

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

/* Platform Selector */
.platform-selector {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f0fdfa;
    border: 2px solid #99f6e4;
    border-radius: 8px;
}

.platform-selector label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0f766e;
}

.help-text {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: normal;
    margin-left: 0.5rem;
}

.platform-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #14b8a6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.platform-dropdown:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Metadata Fields */
.metadata-fields {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.metadata-fields h3 {
    color: #0f766e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.field-group {
    margin-bottom: 1rem;
}

.field-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #475569;
    font-weight: 500;
}

.field-group input,
.field-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.field-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.field-group input:focus,
.field-group textarea:focus {
    outline: none;
    border-color: #14b8a6;
}

.field-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    min-height: 45px;
}

.tag {
    background: #14b8a6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
}

.tags-input input {
    border: none;
    flex: 1;
    min-width: 150px;
    padding: 0.5rem;
    font-size: 0.95rem;
}

.tags-input input:focus {
    outline: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: flex-end;
}

/* Textarea */
textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #14b8a6;
}

textarea::placeholder {
    color: #9ca3af;
}

/* Input Stats */
.input-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #64748b;
}

.stat strong {
    color: #0f766e;
    font-weight: 600;
}

/* JSON Output */
.json-output {
    min-height: 400px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.json-output.has-content {
    background: #1e293b;
    color: #e2e8f0;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 350px;
    color: #94a3b8;
    text-align: center;
}

.placeholder p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.placeholder-hint {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

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

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    color: #0f766e;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.info-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Features Section */
.features-section {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.features-section h2 {
    text-align: center;
    color: #0f766e;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.feature-item h4 {
    color: #0f766e;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Use Cases Section */
.use-cases-section {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.use-cases-section h2 {
    text-align: center;
    color: #0f766e;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.use-case-card {
    background: #f0fdfa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #99f6e4;
}

.use-case-card h4 {
    color: #0f766e;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.use-case-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
footer {
    background: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #0f766e;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    color: #64748b;
}

.footer-section li {
    padding: 0.25rem 0;
}

.footer-section li:before {
    content: "✓ ";
    color: #14b8a6;
    font-weight: bold;
    margin-right: 0.5rem;
}

.footer-email a {
    color: #14b8a6;
    text-decoration: none;
}

.footer-email a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.footer-bottom a {
    color: #14b8a6;
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

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

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-left: 0;
    }

    .logo-container {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .features-grid,
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

/* JSON Syntax Highlighting */
.json-key {
    color: #7dd3fc;
}

.json-string {
    color: #86efac;
}

.json-number {
    color: #fbbf24;
}

.json-boolean {
    color: #f472b6;
}

.json-null {
    color: #94a3b8;
}
