/* ===========================
   KEYFRAME ANIMATIONS
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 120, 212, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 120, 212, 0.8);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes checkmark {
    0% {
        stroke-dashoffset: 50;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

:root {
    /* Dark Theme Colors */
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
    
    /* Fabric Category Colors - Vibrant & Saturated (ETL Flow) */
    --real-time-intelligence: #E94F87; /* Pink - Ingestion */
    --onelake: #0078D4;                /* Blau - Storage */
    --data-engineering: #00C853;       /* Grün - Transformation */
    --data-warehouse: #1A237E;         /* Dunkelblau - Warehousing */
    --database: #7B1FA2;               /* Lila - Operational Databases */
    --data-science: #00BCF2;           /* Hellblau - ML/AI */
    --power-bi: #F2C811;               /* Power BI Gelb - Visualization */
    --governance: #6E7B8B;             /* Grau meliert - Management */
    --ai-copilot: #E94F87;             /* Pink - AI (same as RTI) */
    
    /* UI Elements */
    --accent-blue: #0078d4;
    --hover-bg: #2a2a2a;
}

/* Light Theme */
body.light-theme {
    --bg-dark: #f5f5f5;
    --bg-darker: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --hover-bg: #f0f0f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* ==================== ACCESSIBILITY ==================== */

/* Skip to content link for keyboard navigation */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Enhanced focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Remove default focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Specific focus styles for buttons */
button:focus-visible,
.social-icon:focus-visible,
.element-card:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
}

/* Focus styles for inputs */
input:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 0;
    border-color: var(--accent-blue);
}

/* ==================== END ACCESSIBILITY ==================== */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==================== HEADER ==================== */
header {
    background-color: var(--bg-dark);
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 60px;
    line-height: 1;
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-title h1 {
    font-size: 2em;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icon {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 24px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.social-icon:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.social-icon:active {
    transform: translateY(0);
}

/* Highlight Share and Download buttons */
button.social-icon {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

button.social-icon:hover {
    background: var(--hover-bg);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.theme-toggle,
.fullscreen-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.theme-toggle:hover,
.fullscreen-btn:hover {
    color: var(--text-primary);
}

/* ==================== SEARCH ==================== */
.search-section {
    padding: 40px 0;
}

.search-legend-container {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.legend-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}

.legend-item-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: default;
    transition: all 0.2s;
}

.legend-item-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.legend-color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-short-name {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.search-box-wrapper {
    flex: 1;
    max-width: 600px;
    margin-left: auto;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 16px 20px 16px 55px;
    font-size: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

#searchInput::placeholder {
    color: var(--text-secondary);
}

/* ==================== FILTER SECTION ==================== */
/* Smart Filter Sidebar (Right) */
.filter-sidebar-right {
    width: 320px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    align-self: flex-start;
}

.filter-sidebar-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-sidebar-header h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 12px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-count {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 6px 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    flex: 1;
}

.clear-all-btn {
    padding: 6px 12px;
    background: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.clear-all-btn:hover {
    background: var(--accent-blue);
    color: white;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group-title {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Bubble Pills (≤9 items) */
.filter-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8em;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on hover */
.filter-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.filter-bubble:hover::before {
    left: 100%;
}

.filter-bubble:hover:not(.disabled) {
    background: var(--hover-bg);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.filter-bubble.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    animation: glow 2s ease-in-out infinite;
}

.filter-bubble.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.filter-bubble-label {
    font-weight: 500;
}

.filter-bubble-count {
    font-size: 0.75em;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 8px;
}

.filter-bubble.active .filter-bubble-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Checkbox List (>9 items) */
.filter-checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    background: var(--bg-dark);
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85em;
    color: var(--text-primary);
}

.filter-checkbox-item:hover:not(.disabled) {
    background: var(--hover-bg);
}

.filter-checkbox-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.filter-checkbox-item.active .filter-checkbox {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.filter-checkbox-item.active .filter-checkbox::after {
    content: '✓';
    color: white;
    font-size: 0.7em;
    font-weight: bold;
}

.filter-checkbox-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-checkbox-count {
    font-size: 0.8em;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Scrollbar styling */
.filter-sidebar-right::-webkit-scrollbar,
.filter-checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar-right::-webkit-scrollbar-track,
.filter-checkbox-list::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar-right::-webkit-scrollbar-thumb,
.filter-checkbox-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.filter-sidebar-right::-webkit-scrollbar-thumb:hover,
.filter-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==================== MAIN LAYOUT ==================== */
.main-layout {
    display: flex;
    gap: 20px;
    padding: 40px 0;
    align-items: flex-start;
}

.table-section {
    flex: 1;
    min-width: 0; /* Important for flex overflow */
    overflow-x: auto;
    padding: 10px;
}

/* ==================== PERIODIC TABLE ==================== */
.periodic-table {
    display: flex;
    flex-direction: row;
    gap: 8px;
    min-width: fit-content;
}

.category-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 8px;
}

.element-card {
    width: 120px;
    height: 90px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out backwards;
    margin: 5px 0;
    overflow: hidden;
}

/* Staggered animation delay für Cards */
.element-card:nth-child(1) { animation-delay: 0.05s; }
.element-card:nth-child(2) { animation-delay: 0.1s; }
.element-card:nth-child(3) { animation-delay: 0.15s; }
.element-card:nth-child(4) { animation-delay: 0.2s; }
.element-card:nth-child(5) { animation-delay: 0.25s; }

/* Ripple effect container */
.element-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.element-card:active::before {
    width: 300px;
    height: 300px;
}

.element-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.1);
    z-index: 10;
}

/* Preview Badge Pulse Animation */
.element-card[data-status="Preview"]::after {
    animation: pulse 2s ease-in-out infinite;
}

.element-number {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 600;
}

.element-symbol {
    font-size: 18px;
    font-weight: 700;
    margin: 2px 0;
    letter-spacing: -0.5px;
}

.element-name {
    font-size: 10px;
    opacity: 0.9;
    line-height: 1.2;
    font-weight: 400;
}

.element-icon {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.element-card:hover .element-icon {
    opacity: 0.9;
    transform: rotate(360deg) scale(1.2);
}

/* Category Colors */
.element-card[data-category="data-engineering"] {
    background: var(--data-engineering);
    color: #000;
}

.element-card[data-category="data-science"] {
    background: var(--data-science);
    color: #000;
}

.element-card[data-category="data-warehouse"] {
    background: var(--data-warehouse);
    color: #fff;
}

.element-card[data-category="database"] {
    background: var(--database);
    color: #fff;
}

.element-card[data-category="real-time-intelligence"] {
    background: var(--real-time-intelligence);
    color: #fff;
}

.element-card[data-category="power-bi"] {
    background: var(--power-bi);
    color: #fff;
}

.element-card[data-category="onelake"] {
    background: var(--onelake);
    color: #000;
}

.element-card[data-category="governance"] {
    background: var(--governance);
    color: #fff;
}

.element-card[data-category="ai-copilot"] {
    background: var(--ai-copilot);
    color: #fff;
}

/* ==================== LEGEND ==================== */
/* Old legend styles - kept for backwards compatibility but hidden */
.legend:not(.legend-compact) {
    display: none;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 0 0 auto;
    min-width: 180px;
}

.legend-item:hover {
    background: var(--hover-bg);
}

.legend-color {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
}

.legend-text {
    flex: 1;
}

.legend-label {
    font-size: 0.95em;
    font-weight: 500;
    margin-bottom: 2px;
}

.legend-count {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.05);
}

/* Light Theme Close Button */
body.light-theme .close {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .close:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.modal-icon {
    width: 40px;
    height: 40px;
}

.modal-title {
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-category {
    color: var(--text-secondary);
    font-size: 0.95em;
    text-transform: capitalize;
    margin-bottom: 5px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-style: italic;
}

.modal-body {
    padding: 30px 40px;
}

/* Modal Sections */
.modal-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-subtitle {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

.modal-description {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Modal Info Grid (for Naming Convention) */
.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.95em;
    color: var(--text-primary);
}

.info-value code,
code.info-value {
    background: var(--bg-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--accent-blue);
    font-size: 0.9em;
}

/* Modal Feature List */
.modal-feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.modal-feature-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: bold;
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
}

.modal-link:hover {
    background: #005a9e;
}

.modal-link-secondary {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-link-secondary:hover {
    background: var(--hover-bg);
}

/* Code Blocks */
.code-block {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9em;
    color: var(--accent-blue);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

/* ==================== FOOTER ==================== */
footer {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-branding h3 {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.footer-branding p {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin: 0;
}

.footer-branding p a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.footer-branding p a:hover {
    opacity: 0.8;
}

.footer-cta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-primary {
    background: linear-gradient(135deg, var(--accent-blue), #005a9e);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.5);
    background: linear-gradient(135deg, #0086e6, #0078d4);
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.cta-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}

.footer-divider {
    width: 100%;
    max-width: 600px;
    height: 1px;
    background: var(--border-color);
}

.footer-copyright {
    font-size: 0.95em;
    color: var(--text-secondary);
}

.footer-copyright strong {
    color: var(--text-primary);
}

.footer-copyright a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-copyright a:hover {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-note {
    font-size: 0.85em;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.5;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .main-layout {
        flex-direction: column;
        padding: 30px 0;
    }
    
    .filter-sidebar-right {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        order: -1; /* Move filters above table on mobile */
        margin-bottom: 20px;
    }
    
    .table-section {
        width: 100%;
    }
    
    .legend {
        width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .search-legend-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .legend-compact {
        width: 100%;
        justify-content: center;
    }
    
    .search-box-wrapper {
        max-width: 100%;
        margin-left: 0;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-left {
        flex-direction: column;
        text-align: center;
    }
    
    .header-title h1 {
        font-size: 1.5em;
    }
    
    .element-card {
        width: 100px;
        height: 75px;
        padding: 6px;
    }
    
    
    .element-symbol {
        font-size: 14px;
    }
    
    .element-name {
        font-size: 9px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-header,
    .modal-body {
        padding: 30px 20px;
    }
}

/* ==================== SHARE MODAL ==================== */
.share-modal-content {
    max-width: 600px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 1em;
    font-weight: 400;
    margin-top: 5px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.share-button svg {
    flex-shrink: 0;
}

.share-button.linkedin {
    background: #0077b5;
    color: white;
}

.share-button.linkedin:hover {
    background: #005582;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
}

.share-button.twitter {
    background: #1da1f2;
    color: white;
}

.share-button.twitter:hover {
    background: #0c85d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

.share-button.copy {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.share-button.copy:hover {
    border-color: var(--accent-blue);
    background: var(--hover-bg);
    transform: translateY(-2px);
}

/* PowerPoint Section */
.powerpoint-section {
    background: linear-gradient(135deg, rgba(185, 64, 33, 0.1), rgba(185, 64, 33, 0.05));
    border: 2px solid rgba(185, 64, 33, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.powerpoint-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.powerpoint-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 15px 20px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.powerpoint-btn svg {
    margin-right: 10px;
}

.powerpoint-btn:hover {
    border-color: #B94021;
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(185, 64, 33, 0.2);
}

.btn-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 30px;
}

.share-text-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.share-text-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.share-text-box textarea {
    width: 100%;
    height: 140px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.share-text-box textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.copy-text-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.copy-text-btn:hover {
    background: #005a9e;
    transform: translateY(-1px);
}

/* ==================== CHANGELOG MODAL ==================== */
.changelog-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.changelog-content {
    padding: 20px 0;
}

.changelog-version {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.changelog-version:last-of-type {
    border-bottom: none;
}

.version-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.version-header h3 {
    font-size: 1.5em;
    margin: 0;
    color: var(--accent-blue);
}

.version-date {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.version-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-badge.new {
    background: linear-gradient(135deg, var(--accent-blue), #0056b3);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.changelog-section {
    margin-bottom: 25px;
}

.changelog-section h4 {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.changelog-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-section ul li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.changelog-section ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: bold;
    font-size: 1.2em;
}

.changelog-section ul li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.changelog-section ul li p {
    margin: 5px 0 0 0;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.changelog-section .sub-list {
    margin-top: 10px;
    padding-left: 20px;
}

.changelog-section .sub-list li {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.changelog-section .sub-list li::before {
    content: "→";
    color: var(--text-secondary);
}

.changelog-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.changelog-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.changelog-footer a:hover {
    color: #005a9e;
    transform: translateX(5px);
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ==================== SCROLL TO TOP BUTTON ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-to-top:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.6);
    animation: float 2s ease-in-out infinite;
}

.scroll-to-top:active {
    transform: scale(0.95);
}

.scroll-to-top svg {
    animation: none;
}

.scroll-to-top:hover svg {
    animation: float 1.5s ease-in-out infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== FLOATING FEEDBACK BUTTON ===== */
.feedback-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.feedback-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.feedback-button:active {
    transform: translateY(-2px) scale(1.02);
}

.feedback-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.feedback-button span {
    white-space: nowrap;
}

/* Light theme feedback button */
body.light-theme .feedback-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

body.light-theme .feedback-button:hover {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* Mobile optimization */
@media (max-width: 768px) {
    .feedback-button {
        bottom: 80px;
        right: 20px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .feedback-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Animation for attention */
@keyframes pulse-feedback {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(102, 126, 234, 0.7);
    }
}

.feedback-button {
    animation: pulse-feedback 3s ease-in-out infinite;
}

.feedback-button:hover {
    animation: none;
}

