/* Modern UI Styles - Unified Design System */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
    padding: 20px;
}

/* Sandbox Environment Banner */
.sandbox-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sandbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.sandbox-icon {
    font-size: 16px;
}

/* Adjust body padding to account for fixed banner */
body:has(.sandbox-banner) {
    padding-top: 60px;
}

/* Layout Components */
.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: calc(100vh - 40px);
}

.page-standard {
    padding: 20px;
    min-height: calc(100vh - 40px);
}

/* Container variants with glassmorphism effect */
.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.container:hover {
    transform: translateY(-4px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}

.container-large {
    max-width: 1200px;
}

.container-full {
    max-width: none;
    margin: 20px;
}

/* Logo Component */
.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 20px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.logo-small {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin: 0 0 15px 0;
    border-radius: 50%;
}

/* Typography */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

h3 {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 40px;
    line-height: 1.6;
    text-align: center;
    font-weight: 300;
}

/* Message Components */
.welcome-message {
    color: #555;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.info-message {
    color: #555;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.success-message {
    color: #155724;
    background: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
}

.warning-message {
    color: #856404;
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.error-message {
    color: #721c24;
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

/* Primary button with gradient and animations */
.connect-button, .btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 18px 36px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    margin-bottom: 32px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.connect-button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.4);
}

.connect-button:active:not(:disabled), .btn:active:not(:disabled) {
    transform: translateY(0);
}

.connect-button:disabled, .btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #d1d5db);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Shimmer effect for buttons */
.connect-button::before, .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.connect-button:hover:not(:disabled)::before, .btn:hover:not(:disabled)::before {
    left: 100%;
}

/* Button variants */
.secondary-button, .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #4f46e5;
    border: 2px solid #4f46e5;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.secondary-button:hover, .btn-secondary:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
    min-width: auto;
    margin-bottom: 16px;
}

/* Status container and messages */
.status-container {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.status {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.status.loading {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Status icons */
.icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.icon.success {
    background: #10b981;
}

.icon.error {
    background: #ef4444;
}

/* Section Components */
.samples-section {
    margin-top: 30px;
    text-align: center;
}

.samples-title {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

.content-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

/* Feature list styling */
.feature-list {
    text-align: left;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

/* Sample links grid */
.sample-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.sample-link {
    display: inline-block;
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-align: center;
}

.sample-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Navigation Components */
.nav-back {
    margin-bottom: 20px;
}

.nav-back a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-back a:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(-5px);
}

/* Footer Component */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.9em;
    text-align: center;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #764ba2;
}

/* Card Components */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

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

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title {
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Form Components */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Text utilities */
.text-gradient {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: #6b7280;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Layout utilities */
.flex-center, .d-flex.justify-center.align-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.align-center { align-items: center; }

/* Spacing utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Background variants */
.bg-gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
}

.bg-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

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

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }

    h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .sample-links {
        grid-template-columns: 1fr;
    }

    .logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .sample-link, .btn, .connect-button {
        padding: 12px 20px;
        font-size: 0.9em;
        min-width: auto;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 2001;
}

.modal-content h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-content .subtitle {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 20px;
}

/* Badge animation */
.under-dev span {
    transition: all 0.2s ease;
}

/* Responsive modal */
@media (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
}