/**
 * Maps to BayernAtlas Converter - Stylesheet
 * Modern, clean design with CSS custom properties
 */

:root {
    --primary: #0066cc;
    --primary-hover: #0052a3;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --success: #2f855a;
    --error: #c53030;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

p.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg);
    border-radius: 8px;
    padding: 0.25rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-btn:hover:not(.active) {
    color: var(--text-main);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg);
    border-radius: 6px;
    padding: 0.25rem;
}

.lang-btn {
    padding: 0.375rem 0.625rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

.lang-btn:hover:not(.active) {
    background: var(--border);
}

/* Form Elements */
.input-group {
    margin-bottom: 1.5rem;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
}

/* Buttons */
button.btn-convert {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button.btn-convert:hover {
    background-color: var(--primary-hover);
}

button.btn-convert:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
}

/* Result Area */
.result-area {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: none;
}

.result-area.active {
    display: block;
}

.result-item {
    margin-bottom: 1rem;
}

.result-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1rem;
    font-weight: 500;
    word-break: break-all;
}

/* Result Link Box */
.result-link-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: #e6f2ff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    color: #004080;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: 0.25rem;
}

.result-link-box:hover {
    background: #cce4ff;
}

.result-link-box svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.result-link-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* Copy Button */
.copy-btn {
    flex-shrink: 0;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #f0f7ff;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
}

/* Toast Notifications */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.toast.error { background-color: var(--error); }
.toast.success { background-color: var(--success); }

/* Loading Spinner */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

button.loading .btn-text { display: none; }
button.loading .loading-spinner { display: block; }

/* FAQ Styles */
.faq-section {
    margin-bottom: 2rem;
}

.faq-section h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.faq-section h3 {
    font-size: 1rem;
    color: var(--text-main);
    margin: 1rem 0 0.5rem 0;
}

.faq-section p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* URL Format Cards */
.url-format {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.url-format strong {
    color: var(--text-main);
}

.url-format code {
    display: block;
    margin-top: 0.5rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    word-break: break-all;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Info List */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.info-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
}

/* Status Codes */
.status-codes {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.status-code {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.875rem;
}

.status-code code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-weight: 600;
}

.status-code.success code { color: var(--success); }
.status-code.error code { color: var(--error); }
.status-code.warning code { color: #d97706; }
