/* ========================================
   FONT IMPORT
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #1e3c72 100%);
    background-attachment: fixed;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .hero {
        background: rgba(20, 20, 40, 0.85);
    }
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #4ecdc4; /* Fallback for unsupported browsers */
    animation: gradientShift 3s ease-in-out infinite;
}

/* Fix for Firefox - show fallback color */
@-moz-document url-prefix() {
    .hero h1 {
        color: #4ecdc4;
        -webkit-text-fill-color: unset;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

@supports not (backdrop-filter: blur(10px)) {
    .nav {
        background: rgba(20, 20, 40, 0.95);
    }
}

.nav-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.nav-btn:hover,
.nav-btn:focus-visible {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* ========================================
   HAMBURGER MENU
   ======================================== */
.hamburger {
    display: none;
    font-size: 30px;
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.hamburger:hover,
.hamburger:focus-visible {
    background: rgba(255, 255, 255, 0.3);
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

@supports not (backdrop-filter: blur(10px)) {
    .section {
        background: rgba(20, 20, 40, 0.85);
    }
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 30px;
    color: #4ecdc4;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.section h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin: 25px 0 15px 0;
    color: #ff6b6b;
    border-left: 4px solid #ff6b6b;
    padding-left: 15px;
}
/* ==============================
   INFO PANEL OVERLAY + PANEL
   ============================== */

.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
    z-index: 9998;
}

.info-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* PANEL BASE */
.info-panel {
    position: fixed;
    background: whitesmoke;
    color: black;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 0 28px rgba(0,0,0,0.28);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.32s ease;
    max-height: 85vh;
    overflow-y: auto;
    width: 90%;
    z-index: 9999;
}

/* DESKTOP SLIDE RIGHT */
.info-panel.desktop {
    right: -450px;
    top: 0;
    height: 100vh;
    width: 420px;
    border-radius: 0;
}

.info-panel.desktop.show {
    right: 0;
    opacity: 1;
}

/* MOBILE BOTTOM SHEET */
.info-panel.mobile {
    left: 50%;
    bottom: -100%;
    transform: translateX(-50%);
}

.info-panel.mobile.show {
    bottom: 0;
    opacity: 1;
}

/* Close Button */
.info-close-btn {
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    text-align: right;
    margin-bottom: 10px;
    color: #c62828;
}

/* Info Icon on Cards */
.info-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 14px;
    background: #007bff;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.85;
    transition: 0.2s;
    z-index: 50;
}

.info-icon:hover {
    opacity: 1;
}

/* ========================================
   COMMAND GRID
   ======================================== */
.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 20px;
    margin: 20px 0;
}

.command-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #4ecdc4;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.command-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4ecdc4, #45b7d1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.command-card:hover::before {
    transform: scaleX(1);
}

.command-card:hover {
    transform: translateX(10px);
    background: rgba(0, 0, 0, 0.4);
}

.command-card:focus-within {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

.command {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 16px;
    border-radius: 8px;
    color: #4ecdc4;
    font-size: 0.9rem;
    margin: 10px 0;
    border: 1px solid rgba(78, 205, 196, 0.3);
    position: relative;
    word-break: break-word;
}

.command::before {
    content: '$';
    color: #ff6b6b;
    margin-right: 8px;
    font-weight: bold;
}

.description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* ========================================
   COPY BUTTON
   ======================================== */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(78, 205, 196, 0.8);
    border: none;
    border-radius: 5px;
    color: white;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
}

.command-card:hover .copy-btn,
.command-card:focus-within .copy-btn,
.copy-btn:focus-visible {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(78, 205, 196, 1);
    transform: scale(1.05);
}

.copy-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.copy-btn.copied {
    background: rgba(76, 175, 80, 0.9);
}

/* ========================================
   WORKFLOWS
   ======================================== */
.scenario {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.scenario h3 {
    color: #f9ca24;
    border-left-color: #f9ca24;
    font-size: clamp(1.3rem, 3vw, 2rem);
}

.workflow {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(10px);
}

.step-number {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    color: white;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   TIPS & WARNINGS
   ======================================== */
.tip {
    background: rgba(249, 202, 36, 0.2);
    border-left: 4px solid #f9ca24;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.tip::before {
    content: '💡 ';
    font-size: 1.2rem;
}

.tip.best-practices ul {
    margin-top: 10px;
    padding-left: 20px;
}

.tip.best-practices li {
    margin: 5px 0;
}

.warning {
    background: rgba(255, 107, 107, 0.2);
    border-left: 4px solid #ff6b6b;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.warning::before {
    content: '⚠️ ';
    font-size: 1.2rem;
}

/* ========================================
   BEST PRACTICES CARDS
   ======================================== */
.best-practice-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #4ecdc4;
    transition: all 0.3s ease;
}

.best-practice-card:hover {
    transform: translateX(10px);
    background: rgba(0, 0, 0, 0.4);
}

.best-practice-card h4 {
    color: #4ecdc4;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.best-practice-card ul {
    list-style: none;
    padding: 0;
}

.best-practice-card li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   FLOATING ELEMENTS
   ======================================== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 40%;
    right: 20%;
    animation-delay: 4s;
}

/* ========================================
   SPARKLE EFFECT
   ======================================== */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #4ecdc4;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 0.6s ease-out forwards;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-20px);
    }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    margin-top: 40px;
}

.footer h3 {
    color: #4ecdc4;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.footer p {
    margin: 10px 0;
}

.footer-meta {
    margin-top: 20px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ========================================
   ICON
   ======================================== */
.icon {
    font-size: 2rem;
    margin-right: 10px;
}

/* ========================================
   ACCESSIBILITY & REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for better keyboard navigation */
*:focus-visible {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 20px;
        background: rgba(0, 0, 0, 0.95);
        position: fixed;
        top: 70px;
        right: 20px;
        border-radius: 10px;
        width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    .nav.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    .command-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 20px;
    }

    .hero {
        padding: 40px 20px;
    }

    .workflow-step {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 15px;
    }

    .command {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .copy-btn {
        position: static;
        opacity: 1;
        margin-top: 10px;
        width: 100%;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    body {
        background: white;
        color: black;
    }

    .hamburger,
    .floating-elements,
    .copy-btn {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ---------- PRINT WATERMARK ONLY ---------- */
@media print {
    body::before {
        content: "chinthaparthisridhar.in © 2025";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-35deg);
        font-size: 60px;
        color: rgba(0, 0, 0, 0.15);  /* light watermark */
        font-weight: 700;
        white-space: nowrap;
        z-index: 9999;
        pointer-events: none;
    }
}

