/* Modern Trading UI Styles */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --neutral: #6b7280;
    --bg-dark: #1f2937;
    --bg-light: #f9fafb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text: #111827;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    color: var(--text-primary);
}

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

/* Header */
.header {
    color: white;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    flex: 1;
}

.header-left h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.btn-logout {
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left h1 {
        font-size: 2rem;
    }
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.mode-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mode-btn.active {
    background: white;
    color: var(--primary);
    border-color: white;
}

/* Mode Content */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Form Styles */
.form-grid {
    display: grid;
    gap: 2rem;
}

.form-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.form-subsection {
    margin-bottom: 1rem;
}

.form-subsection h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Collapse Button */
.collapse-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
}

.collapse-btn:hover {
    color: var(--primary-dark);
}

.collapse-btn .arrow {
    transition: transform 0.3s ease;
}

.collapse-btn.active .arrow {
    transform: rotate(180deg);
}

.collapsible-content {
    margin-top: 1rem;
}

/* Form Hint */
.form-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    background: var(--neutral);
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: inline-block;
}

/* Results Container */
.results-container {
    animation: fadeIn 0.5s ease;
}

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

/* Signal Card */
.signal-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.signal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.signal-title h3 {
    font-size: 1.5rem;
}

.signal-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.signal-badge.long {
    background: #d1fae5;
    color: #065f46;
}

.signal-badge.short {
    background: #fee2e2;
    color: #991b1b;
}

.signal-badge.hold {
    background: #e5e7eb;
    color: #374151;
}

.signal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Trade Setup */
.trade-setup {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.trade-setup h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.setup-item {
    display: flex;
    flex-direction: column;
}

.setup-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.setup-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.setup-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Signal Lists */
.signal-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.signal-list {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
}

.signal-list h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.signal-list ul {
    list-style: none;
}

.signal-list li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.signal-list li:last-child {
    border-bottom: none;
}

/* Scan Results */
.scan-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.opportunity-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.opportunity-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Clickable Card Styles */
.clickable-card {
    cursor: pointer;
    position: relative;
}

.clickable-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.clickable-card:hover::after {
    border-color: var(--primary);
}

.clickable-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 6px 12px -2px rgba(0, 0, 0, 0.1);
}

.clickable-card:active {
    transform: translateY(-2px);
}

.click-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-card:hover .click-hint {
    opacity: 1;
}

.opportunity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.opportunity-symbol {
    font-size: 1.25rem;
    font-weight: 700;
}

.opportunity-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Actionable Badge */
.actionable-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.actionable-badge.yes {
    background: #d1fae5;
    color: #065f46;
}

.actionable-badge.no {
    background: #fef3c7;
    color: #92400e;
}

/* Risk Badge */
.risk-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.risk-badge.low {
    background: #d1fae5;
    color: #065f46;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.risk-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

/* Restored Indicator */
.restored-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease;
}

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

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Score Breakdown Styles */
.score-breakdown-panel {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(79, 70, 229, 0.3);
    overflow: hidden;
}

.score-breakdown-title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    margin: 0;
    background: rgba(79, 70, 229, 0.05);
    border-bottom: 1px solid rgba(79, 70, 229, 0.2);
}

.score-breakdown-content {
    padding: 1.5rem;
    font-family: 'Courier New', 'Courier', monospace;
    background: rgba(255, 255, 255, 0.5);
}

.score-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.score-label {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
}

.score-label-bold {
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.score-dots {
    border-bottom: 1px dotted rgba(0, 0, 0, 0.2);
    min-width: 20px;
}

.score-value {
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
}

.score-value.positive {
    color: var(--success);
}

.score-value.negative {
    color: var(--danger);
}

.score-weight {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

.score-arrow {
    color: var(--primary);
    font-size: 1.2rem;
    margin-left: 0.25rem;
}

.score-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(79, 70, 229, 0.3), transparent);
    margin: 1rem 0;
}

.score-total-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    font-size: 1rem;
}

.score-total {
    font-size: 1.2rem;
    font-weight: 800;
}

.score-signal-info {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.score-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.score-info-value {
    font-weight: 700;
    color: var(--text-primary);
}

.score-signal-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.score-signal-badge.long {
    background: var(--success);
    color: white;
}

.score-signal-badge.short {
    background: var(--danger);
    color: white;
}

.score-signal-badge.hold {
    background: var(--warning);
    color: white;
}

.score-interpretation {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(79, 70, 229, 0.1);
}

.interpretation-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.interpretation-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

/* Institutional Data Styles */
.institutional-data {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid var(--primary);
}

.institutional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.institutional-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

.institutional-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.institutional-card.divergence-alert {
    border-color: var(--warning);
    background: #fef3c715;
}

.inst-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.inst-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.inst-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.inst-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.inst-bar-fill.long {
    background: linear-gradient(90deg, var(--success) 0%, #10b98180 100%);
}

.inst-bar-fill.short {
    background: linear-gradient(90deg, var(--danger) 0%, #ef444480 100%);
}

/* Open Interest Styles */
.open-interest-data {
    background: linear-gradient(135deg, #10b98115 0%, #059c6915 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid var(--success);
}

.oi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.oi-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.oi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.oi-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.oi-value.positive {
    color: var(--success);
}

.oi-value.negative {
    color: var(--danger);
}

.oi-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .mode-selector {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .signal-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .setup-grid {
        grid-template-columns: 1fr;
    }
    
    .institutional-grid,
    .oi-grid {
        grid-template-columns: 1fr;
    }
}


/* Whale Data Panels */
.whale-data-panel,
.structure-data-panel {
    background: rgba(79, 70, 229, 0.05);
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.whale-data-panel {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
}

.structure-data-panel {
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.05);
}

.whale-grid,
.structure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.whale-card,
.structure-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.whale-card:hover,
.structure-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.whale-label,
.structure-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.whale-value,
.structure-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.whale-value.positive,
.structure-value.positive {
    color: var(--success);
}

.whale-value.negative,
.structure-value.negative {
    color: var(--danger);
}

.whale-subtext,
.structure-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.divergence-alert {
    border: 2px solid var(--warning) !important;
    background: rgba(245, 158, 11, 0.1) !important;
    animation: pulse 2s ease-in-out infinite;
}

.structure-alert {
    border: 2px solid #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

.whale-signals,
.structure-signals {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.whale-signals-title,
.structure-signals-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL STYLES FOR TICKER DETAILS
   ═══════════════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.modal-close:hover,
.modal-close:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    background: var(--bg-light);
}

/* Scrollbar styling for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

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

/* Mobile responsive */
@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Make sure all cards and content in modal are visible */
.modal-body .card,
.modal-body .result-card,
.modal-body .whale-data-panel,
.modal-body .structure-data-panel {
    margin-bottom: 1.5rem;
}

.modal-body .result-header {
    position: sticky;
    top: -2rem;
    background: var(--bg-light);
    z-index: 10;
    padding: 1rem 0;
    margin: -2rem -2rem 1rem -2rem;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border);
}


/* Timestamp banners for modal */
.scan-timestamp-banner,
.refresh-timestamp-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.refresh-timestamp-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.scan-timestamp-banner button,
.refresh-timestamp-banner button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.scan-timestamp-banner button:hover,
.refresh-timestamp-banner button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Modal refresh button */
.modal-refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.modal-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

