/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Header and Navigation */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    height: 32px;
    width: 32px;
}

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
    margin: 0;
}

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

.nav-links a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #6366f1;
}

/* Authentication Section */
.auth-section {
    margin-left: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #6366f1;
    transition: opacity 0.3s ease;
    background: #f3f4f6;
}

.user-avatar.loading {
    opacity: 0.6;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

.user-name {
    font-weight: 500;
    color: #374151;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #6366f1;
}

.notification-warning {
    background: #f59e0b;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #5855eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-secondary:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-logo {
    height: 80px;
    width: 80px;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* Beta Notice Section */
.beta-notice {
    padding: 60px 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-top: 3px solid #f59e0b;
    border-bottom: 3px solid #f59e0b;
}

.beta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.beta-title {
    font-size: 2rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 1rem;
}

.beta-description {
    font-size: 1.125rem;
    color: #78350f;
    line-height: 1.6;
}

.beta-contact {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.beta-contact:hover {
    border-bottom-color: #6366f1;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
}

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.step-number {
    background: #6366f1;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.step-content p {
    color: #6b7280;
    line-height: 1.6;
}

/* Get Started Section */
.get-started {
    padding: 80px 0;
    background: #f9fafb;
}

.get-started-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.get-started-content p {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

.get-started-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.option-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.option-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.option-card p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Instance Cards */
.instances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.instance-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.instance-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.instance-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.instance-title a:hover {
    text-decoration: underline;
}

.instance-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.active {
    background: #e8f5e8;
    color: #2d5a2d;
}

.status-badge.beta {
    background: #fff3cd;
    color: #856404;
}

.instance-owner {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.owner-avatar {
    flex-shrink: 0;
}

.avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.owner-info {
    flex: 1;
    min-width: 0;
}

.owner-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.owner-pubkey {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Monaco', 'Menlo', monospace;
    word-break: break-all;
}

.instance-description {
    margin-bottom: 1.5rem;
}

.instance-description p {
    color: #666;
    line-height: 1.6;
}

.instance-actions {
    display: flex;
    gap: 1rem;
}

/* Join Community CTA */
.join-community-cta {
    margin-top: 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.join-community-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-icon {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #ffd700;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.cta-description {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.feature-icon {
    font-size: 1.25rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-primary-btn {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 600;
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-primary-btn:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .join-community-cta {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Beta Badge */
.beta-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    vertical-align: top;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.beta-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252, #d63031);
}

/* Beta Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
}

.modal-body {
    padding: 1rem 2rem 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

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

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

.footer-section p,
.footer-section a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #6366f1;
}

.footer-bottom {
    text-align: center;
    color: #9ca3af;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.close {
    color: #9ca3af;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #374151;
}

.modal-body {
    padding: 1.5rem 2rem;
    line-height: 1.6;
    color: #374151;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 1rem 2rem 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .auth-section {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .user-name {
        max-width: 100px;
        font-size: 0.875rem;
    }
    
    .logo-icon {
        height: 28px;
        width: 28px;
    }
    
    .nav-logo h1 {
        font-size: 1.25rem;
    }
    
    .hero-logo {
        height: 60px;
        width: 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        height: 24px;
        width: 24px;
    }
    
    .nav-logo h1 {
        font-size: 1.125rem;
    }
    
    .hero-logo {
        height: 50px;
        width: 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .container {
        padding: 0 15px;
    }
}
