* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    position: relative;
}

/* Fullscreen background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    text-align: center;
    width: 100%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(102, 126, 234, 0.2);
}

/* Hero Section */
.hero-section {
    margin-bottom: 50px;
    text-align: left;
}

.hero-content {
    margin-bottom: 40px;
}

.hero-content h2 {
    color: #333;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.hero-description {
    color: #555;
    font-size: 1.3rem;
    line-height: 1.7;
    margin-bottom: 35px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f8ff 100%);
    padding: 30px;
    border-radius: 20px;
    border-left: 6px solid #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.feature-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.feature-item:hover::before {
    transform: translateX(0);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        0 4px 8px rgba(0,0,0,0.1),
        0 8px 16px rgba(0,0,0,0.1);
}

/* Individual 3D icon styles */
.secure-icon {
    background: linear-gradient(145deg, #4fc3f7, #29b6f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 8px 16px rgba(79, 195, 247, 0.4))
           drop-shadow(0 4px 8px rgba(41, 182, 246, 0.3));
}

.security-icon {
    background: linear-gradient(145deg, #66bb6a, #4caf50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 8px 16px rgba(102, 187, 106, 0.4))
           drop-shadow(0 4px 8px rgba(76, 175, 80, 0.3));
}

.speed-icon {
    background: linear-gradient(145deg, #ffa726, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 8px 16px rgba(255, 167, 38, 0.4))
           drop-shadow(0 4px 8px rgba(255, 152, 0, 0.3));
}

.reliability-icon {
    background: linear-gradient(145deg, #ab47bc, #9c27b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 8px 16px rgba(171, 71, 188, 0.4))
           drop-shadow(0 4px 8px rgba(156, 39, 176, 0.3));
}

/* Hover effects for 3D icons */
.feature-item:hover .feature-icon {
    transform: translateY(-5px) rotateX(15deg) rotateY(15deg) scale(1.1);
    text-shadow: 
        0 4px 8px rgba(0,0,0,0.15),
        0 8px 16px rgba(0,0,0,0.15),
        0 16px 32px rgba(0,0,0,0.15);
}

.feature-item:hover .secure-icon {
    filter: drop-shadow(0 12px 24px rgba(79, 195, 247, 0.5))
           drop-shadow(0 6px 12px rgba(41, 182, 246, 0.4))
           drop-shadow(0 20px 40px rgba(79, 195, 247, 0.3));
}

.feature-item:hover .security-icon {
    filter: drop-shadow(0 12px 24px rgba(102, 187, 106, 0.5))
           drop-shadow(0 6px 12px rgba(76, 175, 80, 0.4))
           drop-shadow(0 20px 40px rgba(102, 187, 106, 0.3));
}

.feature-item:hover .speed-icon {
    filter: drop-shadow(0 12px 24px rgba(255, 167, 38, 0.5))
           drop-shadow(0 6px 12px rgba(255, 152, 0, 0.4))
           drop-shadow(0 20px 40px rgba(255, 167, 38, 0.3));
}

.feature-item:hover .reliability-icon {
    filter: drop-shadow(0 12px 24px rgba(171, 71, 188, 0.5))
           drop-shadow(0 6px 12px rgba(156, 39, 176, 0.4))
           drop-shadow(0 20px 40px rgba(171, 71, 188, 0.3));
}

.feature-item h3 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-item p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.connect-prompt {
    margin-bottom: 30px;
}

.connect-prompt h3 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.description {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.3rem;
    line-height: 1.6;
}

.btn {
    padding: 18px 40px;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 8px;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* WalletConnect Logo Styling */
.wallet-connect-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.wallet-connect-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.btn:hover .wallet-connect-icon {
    transform: scale(1.1);
}

.btn:hover .wallet-connect-icon svg {
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
}

.btn.primary {
    background: #667eea;
    color: white;
}

.btn.primary:hover {
    background: #5a6fd8;
}

.btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.btn.secondary:hover {
    background: #e9ecef;
}

.btn.danger {
    background: #dc3545;
    color: white;
}

.btn.danger:hover {
    background: #c82333;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wallet-info {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fff4 100%);
    padding: 35px;
    border-radius: 25px;
    margin-bottom: 35px;
    text-align: left;
    border: 2px solid #e8f5e8;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.success-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 15px 25px;
    border-radius: 30px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid #c3e6cb;
    box-shadow: 0 5px 15px rgba(21, 87, 36, 0.1);
}

.success-icon {
    margin-right: 10px;
    font-size: 1.3rem;
}

.wallet-details {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    backdrop-filter: blur(10px);
}

.wallet-details p {
    margin-bottom: 15px;
    color: #555;
    word-break: break-all;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.wallet-details p:last-child {
    border-bottom: none;
}

.wallet-details strong {
    color: #333;
    min-width: 100px;
    font-weight: 600;
}

.loan-status {
    background: linear-gradient(135deg, #f8f9ff 0%, #e6e8ff 100%);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e6e8ff;
    backdrop-filter: blur(10px);
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 1.2rem;
}

.status-indicator.ready {
    color: #28a745;
}

.pulse-dot {
    width: 15px;
    height: 15px;
    background: #28a745;
    border-radius: 50%;
    margin-right: 12px;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.status-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.hidden {
    display: none !important;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-content h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.8rem;
}

.modal-content input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.modal-content input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1024px) {
    .card {
        padding: 40px;
        max-width: 95%;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 30px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        padding: 25px;
    }
    
    .hero-description {
        font-size: 1.1rem;
        padding: 25px;
    }
    
    .wallet-details p {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .btn {
        padding: 15px 30px;
        font-size: 1.1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 25px 20px;
        max-height: 98vh;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    .success-badge {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}
