/* 
 * inspect.css 
 * Styles for the dataset inspection, upload area, and analytics/visualizations layout.
 */

/* ========== VARIABLES ========== */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414aa;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --primary: #00c853;
    --primary-hover: #00e676;
    --border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(90deg, #00c853, #2196f3);
}

/* ========== BASE STYLES ========== */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(155, 48, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 95% 80%, rgba(255, 0, 127, 0.12) 0%, transparent 50%),
        url("../images/wwwhirl (13).svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #333;
    color: #777;
    cursor: not-allowed;
}

/* ========== NAVBAR ========== */
.navbar {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    top: 0;
    background: rgba(0, 0, 0, 0.113);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--primary);
    display: inline-grid;
    place-items: center;
    font-size: 0.65rem;
    color: #000;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-cta {
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
}

.nav-cta:hover {
    background: var(--border);
}

/* ========== HERO & UPLOAD ========== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.upload-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 60px 20px;
    background: var(--bg-card);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #00c85384;
    background: rgba(101, 209, 0, 0.1);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 15px;
}

.browse-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

/* ========== PROCESSING ANIMATION ========== */
.processing-section {
    padding: 60px 0;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wave-text {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

/* 
 * The wave animation keyframes. 
 * Moves each span up and down.
 */
.wave-text span {
    display: inline-block;
    animation: wave 1.5s infinite ease-in-out;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Delay each letter so they wave in sequence */
.wave-text span:nth-child(1)  { animation-delay: 0.0s; }
.wave-text span:nth-child(2)  { animation-delay: 0.1s; }
.wave-text span:nth-child(3)  { animation-delay: 0.2s; }
.wave-text span:nth-child(4)  { animation-delay: 0.3s; }
.wave-text span:nth-child(5)  { animation-delay: 0.4s; }
.wave-text span:nth-child(6)  { animation-delay: 0.5s; }
.wave-text span:nth-child(7)  { animation-delay: 0.6s; }
.wave-text span:nth-child(8)  { animation-delay: 0.7s; }
.wave-text span:nth-child(9)  { animation-delay: 0.8s; }
.wave-text span:nth-child(10) { animation-delay: 0.9s; }
.wave-text span:nth-child(11) { animation-delay: 1.0s; } /* space */
.wave-text span:nth-child(12) { animation-delay: 1.1s; }
.wave-text span:nth-child(13) { animation-delay: 1.2s; }
.wave-text span:nth-child(14) { animation-delay: 1.3s; }
.wave-text span:nth-child(15) { animation-delay: 1.4s; }
.wave-text span:nth-child(16) { animation-delay: 1.5s; }
.wave-text span:nth-child(17) { animation-delay: 1.6s; }
.wave-text span:nth-child(18) { animation-delay: 1.7s; }
.wave-text span:nth-child(19) { animation-delay: 1.8s; }
.wave-text span:nth-child(20) { animation-delay: 1.9s; }

.processing-subtext {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ========== RESULTS & ANALYTICS ========== */
.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-secondary);
}

.analytics-section,
.visualizations-section {
    padding: 60px 0;
}

/* Dataframe Styling 
 * This targets the native pandas .to_html() output 
 */
.dataframe-container {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;

}

.dataframe-container table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 6px;
}

.dataframe-container th,
.dataframe-container td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.dataframe-container th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
}

/* ========== VISUALIZATIONS GRID ========== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.chart-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.chart-placeholder {
    flex-grow: 1;
    min-height: 250px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

/* Make cards hoverable and clickable */
.results-wrapper .chart-card {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.results-wrapper .chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 200, 83, 0.15);
    border-color: rgba(0, 200, 83, 0.3);
}

/* ========== MODAL/LIGHTBOX FOR FULL SCREEN ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    width: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 30px;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    -webkit-user-select: none;
    user-select: none;
    z-index: 30;
}

.modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Modal styling adjustments for dataframe table */
.modal-content table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.modal-content th,
.modal-content td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.modal-content th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

/* ========== CUSTOM SCROLLBARS ========== */
/* For Webkit browsers (Chrome, Safari, Edge) */
.dataframe-container::-webkit-scrollbar,
.modal-table-wrapper::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dataframe-container::-webkit-scrollbar-track,
.modal-table-wrapper::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.dataframe-container::-webkit-scrollbar-thumb,
.modal-table-wrapper::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5); /* 0.5 opacity background */
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.dataframe-container::-webkit-scrollbar-thumb:hover,
.modal-table-wrapper::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 200, 83, 0.8);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* For Firefox */
.dataframe-container,
.modal-table-wrapper,
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.03);
}


