/* Performance Optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimize animations and transitions for performance */
.loading-screen,
.modal,
.notification,
.work-item,
.content-card,
.btn,
.nav-link {
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce repaints and reflows */
.navbar,
.hero,
.work,
.about,
.contact,
.footer {
    transform: translateZ(0);
}

/* Optimize gradients and shadows */
.hero,
.btn-primary,
.btn-secondary,
.loading-screen {
    background-attachment: fixed;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #e2e8f0;
}

.loading-logo h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #60a5fa;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: #3b82f6;
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #1d4ed8;
    animation-delay: 0.4s;
}

.loading-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
}

.loading-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background-color: #0f172a;
    overflow-x: hidden;
}

/* Dark Theme Scrollbars for Main Page */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.4);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.7);
}

/* Firefox scrollbar styling */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.4) #0f172a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #60a5fa;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #60a5fa;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #60a5fa;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: #cbd5e1;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 999999;
    position: relative;
    padding-bottom: 0.2rem;
}

.hero-title-hidden {
    opacity: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #94a3b8;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #60a5fa;
    color: #0f172a;
}

.btn-primary:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(96, 165, 250, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #60a5fa;
    border: 2px solid #60a5fa;
}

.btn-secondary:hover {
    background: #60a5fa;
    color: #0f172a;
    transform: translateY(-2px);
}

/* Code Window */
.code-window {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.window-header {
    background: #334155;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.window-dots {
    display: flex;
    gap: 0.5rem;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #64748b;
}

.window-dots span:nth-child(1) {
    background: #ef4444;
}

.window-dots span:nth-child(2) {
    background: #f59e0b;
}

.window-dots span:nth-child(3) {
    background: #10b981;
}

.window-title {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

.code-content {
    padding: 1.5rem;
    background: #1e293b;
    border-radius: 0 0 12px 12px;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    transition: min-height 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
}

.code-content.expanded {
    min-height: 200px;
    max-height: 300px;
    padding: 1.5rem;
}

.code-content pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
    overflow-x: auto;
}

.code-content code {
    color: #60a5fa;
}

/* Typing cursor animation */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #60a5fa;
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Ensure code window is properly styled during typing */
.code-window {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

/* Loading screen responsive design */
@media (max-width: 768px) {
    .loading-logo h2 {
        font-size: 2.5rem;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 45px;
        height: 45px;
        top: 7.5px;
        left: 7.5px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 30px;
        height: 30px;
        top: 15px;
        left: 15px;
    }
    
    .loading-title {
        font-size: 1.25rem;
    }
    
    .loading-subtitle {
        font-size: 0.9rem;
    }
}

/* Section Styles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #f1f5f9;
}

/* Trust Indicators Section */
.trust-indicators {
    padding: 4rem 0;
    background: #0f172a;
    color: white;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-5px);
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.trust-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.trust-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f8fafc;
}

.trust-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}



/* About Section */
.about {
    padding: 80px 0;
    background: #0f172a;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
    margin-bottom: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.skill-category h3 {
    color: #60a5fa;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Work Section */
.work {
    padding: 80px 0;
    background: #1e293b;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.work-item {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.work-item:hover {
    transform: translateY(-5px);
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.work-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-placeholder {
    font-size: 3rem;
    color: #60a5fa;
    opacity: 0.8;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-overlay .work-links {
    pointer-events: auto;
}

.work-overlay .work-link:hover {
    background: #3b82f6;
    transform: scale(1.1);
}

.work-links {
    display: flex;
    gap: 1rem;
}

.work-link {
    width: 50px;
    height: 50px;
    background: #60a5fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 20;
    position: relative;
}

.work-link:hover {
    background: #3b82f6;
    transform: scale(1.1);
}

.work-content {
    padding: 1.5rem;
}

.work-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}

.work-content p {
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.work-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #334155;
    color: #60a5fa;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Content Section */
.content {
    padding: 80px 0;
    background: #0f172a;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.content-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-3px);
    border-color: #60a5fa;
    box-shadow: 0 10px 25px rgba(96, 165, 250, 0.1);
}

.content-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.content-avatar {
    width: 50px;
    height: 50px;
    background: #60a5fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 600;
    font-size: 1.1rem;
}

.content-meta h4 {
    font-weight: 600;
    color: #f1f5f9;
}

.content-date {
    color: #64748b;
    font-size: 0.9rem;
}

.content-body p {
    margin-bottom: 1rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.content-tag {
    background: #334155;
    color: #60a5fa;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.content-actions {
    display: flex;
    gap: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: #60a5fa;
}

.content-cta {
    text-align: center;
}

/* Content Placeholder */
.content-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    background: #1e293b;
    border-radius: 12px;
    border: 2px dashed #334155;
    grid-column: 1 / -1;
}

.placeholder-icon {
    font-size: 4rem;
    color: #60a5fa;
    margin-bottom: 1.5rem;
}

.content-placeholder h3 {
    font-size: 1.5rem;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

.content-placeholder p {
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #1e293b;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.contact-info p {
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    color: #60a5fa;
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-badge i {
    font-size: 1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #cbd5e1;
}

.contact-item i {
    color: #60a5fa;
    font-size: 1.2rem;
    width: 20px;
}

.contact-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #60a5fa;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.honeypot-field {
    display: none;
    position: absolute;
    left: -9999px;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #334155;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: #0f172a;
    color: #e2e8f0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #60a5fa;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.email-counter {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

.email-counter #email-count {
    color: #60a5fa;
    font-weight: 600;
}

.email-counter.warning #email-count {
    color: #f59e0b;
}

.email-counter.danger #email-count {
    color: #ef4444;
}

/* Footer */
.footer {
    background: #0f172a;
    color: white;
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    color: #60a5fa;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #60a5fa;
    color: #0f172a;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #0f172a;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-top: 1px solid rgba(148, 163, 184, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
        margin: 1rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }

    .work-grid,
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .work-item {
        margin-bottom: 1rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 1rem;
    }

    .code-window {
        margin: 1rem 0;
        font-size: 0.9rem;
    }

    .code-content {
        padding: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .trust-item {
        padding: 1rem;
    }
    

    
    .contact-trust {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .trust-badge {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 80px;
}

/* Project Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

/* Fullscreen Demo Mode */
.modal.fullscreen {
    background: #000;
    overflow: hidden;
    transition: background 0.3s ease;
}

.modal.fullscreen .modal-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    transform: none;
    background: transparent;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
}

/* Hide all modal elements except the demo content */
.modal.fullscreen .modal-header,
.modal.fullscreen .modal-details,
.modal.fullscreen .project-actions,
.modal.fullscreen .modal-close {
    display: none !important;
}

.modal.fullscreen .modal-body {
    flex: 1;
    display: flex;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100vh;
}

.modal.fullscreen .modal-image {
    flex: 1;
    display: flex;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.modal.fullscreen .project-preview {
    flex: 1;
    display: flex;
    border-radius: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.modal.fullscreen .preview-browser {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.modal.fullscreen .browser-header {
    display: none !important;
}

.modal.fullscreen .browser-content {
    flex: 1;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    padding: 0;
    border: none;
    overflow-y: auto;
    overflow-x: auto;
    background: #fff;
    position: relative;
}

/* Ensure demo content fills properly and acts like desktop */
.modal.fullscreen .ecommerce-preview,
.modal.fullscreen .portfolio-preview,
.modal.fullscreen .dashboard-preview {
    width: 100vw !important;
    min-width: 1200px !important;
    min-height: 100vh !important;
    height: auto !important;
    transform: scale(1) !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    overflow: visible !important;
}

/* Force desktop-like layout in fullscreen */
.modal.fullscreen .ecommerce-preview * {
    max-width: none !important;
    width: auto !important;
}

.modal.fullscreen .portfolio-preview * {
    max-width: none !important;
    width: auto !important;
}

.modal.fullscreen .dashboard-preview * {
    max-width: none !important;
    width: auto !important;
}

/* Fullscreen scrollbars */
.modal.fullscreen .browser-content::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.modal.fullscreen .browser-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal.fullscreen .browser-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.modal.fullscreen .browser-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.modal.fullscreen .browser-content::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.1);
}

/* Professional Exit Button */
.exit-demo-btn {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.exit-demo-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    scale: 1.05;
}

.exit-demo-btn:active {
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    scale: 1.02;
}

.modal.fullscreen .exit-demo-btn {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.modal-content {
    position: relative;
    background: #1e293b;
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid #334155;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #334155;
    background: #0f172a;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    color: #f1f5f9;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #334155;
    color: #f1f5f9;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.modal-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.project-preview {
    width: 100%;
    max-width: 500px;
}

.preview-browser {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.browser-header {
    background: #334155;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #64748b;
}

.browser-dots span:nth-child(1) {
    background: #ef4444;
}

.browser-dots span:nth-child(2) {
    background: #f59e0b;
}

.browser-dots span:nth-child(3) {
    background: #10b981;
}

.browser-url {
    background: #1e293b;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    flex: 1;
    border: 1px solid #475569;
}

.browser-content {
    height: 350px;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Subtle scroll indicators */
.browser-content.demo-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.browser-content.demo-interactive::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(0deg, rgba(0,0,0,0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.browser-content.demo-interactive:hover::before,
.browser-content.demo-interactive:hover::after {
    opacity: 1;
}

.browser-content.demo-interactive {
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Hide scrollbars on mobile for cleaner look */
@media (max-width: 768px) {
    .browser-content::-webkit-scrollbar {
        display: none;
    }
    
    .browser-content {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* Custom Scrollbars for Demo Previews */
.browser-content::-webkit-scrollbar {
    width: 4px;
}

.browser-content::-webkit-scrollbar-track {
    background: transparent;
}

.browser-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.browser-content::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Firefox scrollbar styling */
.browser-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

/* Dark theme scrollbars for specific demos */
.portfolio-preview::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
}

.portfolio-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.6);
}

.dashboard-preview::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
}

.dashboard-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.6);
}

.ecommerce-preview::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
}

.ecommerce-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.6);
}

.modal-details {
    color: #e2e8f0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.project-info h3 {
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.project-info h4 {
    color: #60a5fa;
    margin: 0.8rem 0 0.4rem 0;
    font-size: 1rem;
    flex-shrink: 0;
}

.project-info p {
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.project-info ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.project-info li {
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.modal-tech-tags .tech-tag {
    background: #334155;
    color: #60a5fa;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-shrink: 0;
}

.project-actions .btn {
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}



/* Working Demo Previews */
.ecommerce-preview {
    height: 100%;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

.portfolio-preview {
    height: 100%;
    background: #1e293b;
    overflow: hidden;
    position: relative;
}

.dashboard-preview {
    height: 100%;
    background: #111827;
    overflow: hidden;
    position: relative;
}

/* Interactive Demo Styles */
.demo-interactive {
    height: 400px !important;
    overflow-y: auto;
}

.demo-interactive::-webkit-scrollbar {
    width: 6px;
}

.demo-interactive::-webkit-scrollbar-track {
    background: #1e293b;
}

.demo-interactive::-webkit-scrollbar-thumb {
    background: #60a5fa;
    border-radius: 3px;
}

/* Demo Template Styles - E-commerce */
.demo-ecommerce {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #DFD0B8;
    height: 100%;
    overflow: hidden;
}

.demo-ecommerce-header {
    background: #222831;
    padding: 15px 20px;
    border-bottom: 1px solid #393E46;
    box-shadow: 0 2px 8px rgba(34, 40, 49, 0.3);
}

.demo-ecommerce-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.demo-ecommerce-title {
    font-weight: 700;
    color: #DFD0B8;
    font-size: 20px;
}

.demo-ecommerce-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.demo-ecommerce-cart {
    position: relative;
}

.demo-ecommerce-cart-badge {
    background: #948979;
    color: #222831;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    position: absolute;
    top: -6px;
    right: -6px;
}

.demo-ecommerce-cart-icon {
    font-size: 16px;
    cursor: pointer;
    color: #DFD0B8;
}

.demo-ecommerce-user-icon {
    color: #948979;
    font-size: 14px;
    cursor: pointer;
}

.demo-ecommerce-search {
    max-width: 300px;
}

.demo-ecommerce-search input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #393E46;
    border-radius: 8px;
    font-size: 14px;
    background: #F9F3EF;
    color: #222831;
}

.demo-ecommerce-nav {
    background: #393E46;
    padding: 10px 20px;
    border-bottom: 1px solid #222831;
}

.demo-ecommerce-nav-items {
    display: flex;
    gap: 20px;
    font-size: 14px;
    overflow-x: auto;
}

.demo-ecommerce-nav-active {
    color: #DFD0B8;
    font-weight: 600;
    border-bottom: 2px solid #DFD0B8;
    padding-bottom: 4px;
    white-space: nowrap;
}

.demo-ecommerce-nav-item {
    color: #948979;
    white-space: nowrap;
}

.demo-ecommerce-products {
    padding: 20px;
    background: #DFD0B8;
}

.demo-ecommerce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.demo-ecommerce-product {
    background: #F9F3EF;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(34, 40, 49, 0.15);
    border: 1px solid #948979;
}

.demo-ecommerce-product-image {
    background: #DFD0B8;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 20px;
}

.demo-ecommerce-product-title {
    font-size: 12px;
    font-weight: 600;
    color: #222831;
    margin-bottom: 4px;
}

.demo-ecommerce-product-subtitle {
    font-size: 10px;
    color: #393E46;
    margin-bottom: 6px;
}

.demo-ecommerce-product-price {
    font-size: 14px;
    color: #222831;
    font-weight: 700;
}

.demo-ecommerce-add-btn {
    width: 100%;
    background: #948979;
    color: #F9F3EF;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    cursor: pointer;
}

/* Demo Template Styles - Portfolio */
.demo-portfolio {
    font-family: 'Inter', sans-serif;
    color: #1B3C53;
    background: #F9F3EF;
    height: 100%;
    overflow: hidden;
}

.demo-portfolio-nav {
    background: rgba(69, 104, 130, 0.95);
    padding: 15px 20px;
    border-bottom: 1px solid #D2C1B6;
}

.demo-portfolio-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-portfolio-name {
    color: #F9F3EF;
    font-weight: 700;
    font-size: 18px;
}

.demo-portfolio-menu {
    display: flex;
    gap: 15px;
    font-size: 14px;
    overflow-x: auto;
}

.demo-portfolio-menu-item {
    color: #F9F3EF;
    font-weight: 500;
    white-space: nowrap;
}

.demo-portfolio-hero {
    padding: 30px 20px;
    background: linear-gradient(135deg, #1B3C53 0%, #456882 100%);
    color: white;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: center;
}

.demo-portfolio-hero-content {
    text-align: center;
}

.demo-portfolio-hero-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.demo-portfolio-hero-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.demo-portfolio-hero-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-portfolio-btn-primary {
    padding: 8px 16px;
    border-radius: 6px;
    background: #D2C1B6;
    color: #1B3C53;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}

.demo-portfolio-btn-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    background: transparent;
    color: white;
    text-decoration: none;
    border: 1px solid white;
    font-weight: 600;
    font-size: 12px;
}

.demo-portfolio-avatar {
    text-align: center;
}

.demo-portfolio-avatar-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 300px;
    margin: 0 auto;
}

.demo-portfolio-avatar-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #D2C1B6 0%, #948979 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

.demo-portfolio-avatar-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.demo-portfolio-avatar-title {
    font-size: 12px;
    opacity: 0.8;
}

/* Demo Template Styles - Dashboard */
.demo-dashboard {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    height: 100%;
    overflow: hidden;
}

.demo-dashboard-header {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.demo-dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-dashboard-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.demo-dashboard-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-dashboard-user-avatar {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.demo-dashboard-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.demo-dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.demo-dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.demo-dashboard-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.demo-dashboard-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.demo-dashboard-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.demo-dashboard-card-change {
    font-size: 14px;
    font-weight: 500;
}

.demo-dashboard-card-change.positive {
    color: #10b981;
}

.demo-dashboard-card-change.negative {
    color: #ef4444;
}

/* Dashboard card icon color variants */
.demo-dashboard-card-icon-blue {
    background: #dbeafe !important;
    color: #3b82f6 !important;
}

.demo-dashboard-card-icon-green {
    background: #d1fae5 !important;
    color: #10b981 !important;
}

.demo-dashboard-card-icon-yellow {
    background: #fef3c7 !important;
    color: #f59e0b !important;
}

.demo-dashboard-card-icon-purple {
    background: #f3e8ff !important;
    color: #8b5cf6 !important;
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-actions .btn {
        justify-content: center;
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .browser-content {
        height: 300px;
        font-size: 12px;
    }
    
    .preview-browser {
        height: 350px;
    }
    
    .browser-header {
        padding: 8px 12px;
    }
    
    .browser-url {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .project-info h3 {
        font-size: 1.2rem;
    }
    
    .project-info h4 {
        font-size: 1rem;
    }
    
    .project-info p {
        font-size: 14px;
    }
    
    .modal-tech-tags {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .modal-tech-tags .tech-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5px auto;
        max-height: 98vh;
    }
    
    .modal-body {
        padding: 10px;
        gap: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .browser-content {
        height: 250px;
        font-size: 11px;
    }
    
    .preview-browser {
        height: 300px;
    }
    
    .project-info h3 {
        font-size: 1.1rem;
    }
    
    .project-info h4 {
        font-size: 0.9rem;
    }
    
    .project-info p {
        font-size: 13px;
    }
    
    .project-actions .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
} 