/* Base Styles */
body {
    background-color: #0f0f1a;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* Glass Effects */
.glass {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.glass-strong {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-x 3s ease infinite;
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #252542 100%);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6, #8b5cf6);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #3b82f6);
    border-radius: 3px;
}

/* Mnemonic Word Style */
.mnemonic-word {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.mnemonic-word:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
    transform: translateY(-2px);
}

/* Crypto Card */
.crypto-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.crypto-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

/* Network Indicator */
.network-indicator {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Animations */
.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Input Focus States */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Toast Animation */
#toast {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .glass-strong {
        margin: 0 1rem;
    }
    
    #mnemonicWords {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Selection Color */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* Placeholder Color */
::placeholder {
    color: #6b7280;
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}