:root {
    /* GitHub-inspired color palette */
    --primary-color: #0969da;
    --primary-dark: #0860ca;
    --secondary-color: #238636;
    --secondary-dark: #1a7f37;
    --accent-color: #f6f8fa;
    --text-color: #24292f;
    --text-secondary: #656d76;
    --text-muted: #8c959f;
    --light-gray: #f6f8fa;
    --medium-gray: #d0d7de;
    --border-color: #d0d7de;
    --dark-gray: #656d76;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --success-color: #1a7f37;
    --success-bg: #dafbe1;
    --warning-color: #9a6700;
    --warning-bg: #fff8c5;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    font-size: 14px;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(9, 105, 218, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(35, 134, 54, 0.03) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d0d7de' fill-opacity='0.3'%3E%3Cpath d='M30 10c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20zm0 2c9.941 0 18 8.059 18 18s-8.059 18-18 18-18-8.059-18-18 8.059-18 18-18zm0 4c-7.732 0-14 6.268-14 14s6.268 14 14 14 14-6.268 14-14-6.268-14-14-14zm0 2c6.627 0 12 5.373 12 12s-5.373 12-12 12-12-5.373-12-12 5.373-12 12-12zm0 2c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10-4.477-10-10-10zm0 2c4.418 0 8 3.582 8 8s-3.582 8-8 8-8-3.582-8-8 3.582-8 8-8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 200px 200px, 200px 200px, 120px 120px;
    background-position: 0 0, 100% 100%, 0 0;
    opacity: 0.4;
    z-index: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

header {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

header p {
    font-size: 1.375rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.4;
}

.hero-description {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2.5rem auto;
    max-width: 600px;
    font-size: 1rem;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.create-section {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    position: relative;
    z-index: 1;
}

.create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    background-color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    height: 48px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.create-button:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.create-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.create-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.secondary-button:hover {
    background-color: var(--accent-color);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    box-shadow: var(--shadow-lg);
}

.secondary-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.new-db-section {
    text-align: center;
    margin-bottom: 1rem;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid var(--white);
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
    background-color: var(--white);
}

.result-section {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    animation: slideInDown 0.6s ease-out;
}

.result-section h2 {
    color: var(--success-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.result-section h2::before {
    content: '✓';
    background-color: var(--success-bg);
    color: var(--success-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.connection-details h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.copy-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.copy-wrapper:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.full-width {
    grid-column: 1 / -1;
}

.detail-value {
    flex-grow: 1;
    word-break: break-all;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    color: var(--text-color);
    background: none;
    border: none;
    outline: none;
}

.url-value {
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.copy-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    margin-left: 0.75rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

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

.examples-section {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.examples-section h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 1rem 1.5rem;
    background-color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.example-header:hover {
    background-color: rgba(9, 105, 218, 0.05);
}

.example h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.example-toggle-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--light-gray);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

.example-toggle-button:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.example-toggle-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.example-toggle-button.expanded {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.example-toggle-button.expanded .toggle-icon {
    transform: rotate(180deg);
}

.example-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.example-content.expanded {
    max-height: 1000px;
    opacity: 1;
}

.example-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.coming-soon {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.example {
    margin-bottom: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.example-content pre {
    background-color: var(--accent-color);
    border: none;
    padding: 1.5rem;
    border-radius: 0;
    overflow-x: auto;
    margin: 0;
}

.example-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.45;
}

.example-content ol, .example-content ul {
    padding: 1.5rem;
    margin: 0;
    color: var(--text-secondary);
}

.example-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--accent-color);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 1rem;
        min-height: 60vh;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.125rem;
    }
    
    .hero-description {
        padding: 1.25rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .create-button {
        min-width: 200px;
        height: 44px;
        font-size: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-label {
        margin-bottom: 0.3rem;
    }
    
    .copy-wrapper {
        width: 100%;
    }
    
    .example {
        padding: 1rem;
    }
    
    .example pre {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .example-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        padding: 0.75rem 1rem;
    }
    
    .example-toggle-button {
        align-self: flex-end;
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}