/**
 * Main Stylesheet
 * Custom styles to complement TailwindCSS
 */

/* Custom color scheme */
:root {
    --primary-blue: #3B82F6;
    --dark-blue: #1E40AF;
    --light-bg: #F8FAFC;
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
}

/* Dark Mode Variables */
html.dark {
    --primary-blue: #60a5fa;
    --dark-blue: #3b82f6;
    --light-bg: #111827;
    --text-main: #f3f4f6;
    --text-secondary: #9ca3af;
    --card-bg: #1f2937;
    --card-border: #374151;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

/* Code block styling - removed empty ruleset */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

html.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-blue);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Iframe container for running code */
.iframe-container {
    position: relative;
    width: 100%;
    height: 500px;
    border: 2px solid var(--card-border);
    border-radius: 8px;
    background: white;
    resize: vertical;
    overflow: hidden;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
}

/* Scrollable code preview */
.code-preview-container {
    max-height: 300px;
    overflow-y: auto;
    background: #f9fafb;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
}

html.dark .code-preview-container {
    background: #111827;
}

.code-preview-container pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Note content styling */
.note-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.note-content h1,
.note-content h2,
.note-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.note-content p {
    margin-bottom: 1rem;
}

.note-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #1f2937;
}

html.dark .note-content code {
    background: #374151;
    color: #f3f4f6;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .iframe-container {
        min-height: 300px;
    }
}

/* Glassmorphism & Modern Landing Page Styles */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

html.dark .glass-panel {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

html.dark .glass-card {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Animated Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #3B82F6;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #8B5CF6;
    animation-delay: 2s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: #EC4899;
    animation-delay: 4s;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Neon Text Glow */
.text-glow {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

html.dark .text-glow {
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.6);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

html.dark .gradient-text {
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Floating Icons Animation */
.float-icon {
    animation: float-icon 6s ease-in-out infinite;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

html.dark .card-hover:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}