@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #2563EB;
    /* Vibrant Blue */
    --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(37, 99, 235, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 20%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-brand {
    font-size: 2rem;
    /* Increased size */
    font-weight: 800;
    color: var(--text-primary);
    /* Base color for 'pqr' */
    text-decoration: none;
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
}

.brand-suffix {
    color: var(--primary-color);
    /* Color for '.me' */
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.main-container {
    width: 100%;
    max-width: 700px;
    padding: 0 1.5rem;
    margin-top: 4rem;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem 3rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Decoration line top of card */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

p.subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.15rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.input-container {
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

@media (min-width: 640px) {
    .input-container {
        flex-direction: row;
        background: #F1F5F9;
        padding: 0.5rem;
        border-radius: 14px;
        border: 1px solid var(--border-color);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
        transition: box-shadow 0.3s, border-color 0.3s;
    }

    .input-container:focus-within {
        border-color: #BFDBFE;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        background: #fff;
    }
}

input[type="url"] {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    /* Fallback for mobile */
    border-radius: 10px;
    font-size: 1.05rem;
    color: var(--text-primary);
    background-color: #fff;
    transition: all 0.2s;
    font-family: inherit;
    width: 100%;
}

@media (min-width: 640px) {
    input[type="url"] {
        border: none;
        background: transparent;
        padding: 0.8rem 1rem;
        box-shadow: none;
    }

    input[type="url"]:focus {
        outline: none;
        box-shadow: none;
    }
}

button.primary-btn {
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    font-family: inherit;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

button.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

button.primary-btn:active {
    transform: translateY(0);
}

button.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#result {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background-color: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.4s ease-out;
}

#result.visible {
    display: block;
}

.success-label {
    display: block;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563EB;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.result-link {
    color: #1E40AF;
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    word-break: break-all;
    text-align: left;
}

.result-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.copy-btn {
    background: white;
    border: 1px solid #DBEAFE;
    color: #3B82F6;
    height: 44px;
    width: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #2563EB;
    color: white;
    border-color: #2563EB;
}

/* API Docs Section */
.api-docs {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: left;
}

.api-docs h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-snippet {
    background: #0F172A;
    color: #E2E8F0;
    padding: 1.5rem;
    border-radius: 12px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    line-height: 1.7;
    box-shadow: var(--shadow-md);
    border: 1px solid #334155;
}

.code-comment {
    color: #64748b;
    font-style: italic;
}

.code-method {
    color: #F472B6;
    font-weight: bold;
}

.code-url {
    color: #fff;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #475569;
}

.code-key {
    color: #94A3B8;
}

.code-string {
    color: #7DD3FC;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
/* Dark Theme Footer as requested */
.footer {
    width: 100%;
    margin-top: 6rem;
    /* Increased spacing */
    padding: 4rem 2rem;
    text-align: center;
    background: #111827;
    /* Dark Grey/Black */
    color: #9CA3AF;
    border-top: none;
}

.footer-description {
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    font-size: 1rem;
    line-height: 1.6;
    color: #9CA3AF;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #E5E7EB;
    /* Light Grey */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    opacity: 0.8;
}

.footer-links a:hover {
    color: #60A5FA;
    /* Blue */
    opacity: 1;
}

.copyright {
    color: #6B7280;
    font-size: 0.85rem;
    border-top: 1px solid #1F2937;
    padding-top: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Legal Content Styling */
.legal-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-content p,
.legal-content li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.legal-content ul {
    list-style-position: inside;
    margin-bottom: 1rem;
    padding-left: 1rem;
}