/* Evil Corps Page Styles */

/* Custom Scrollbars */
.all-companies-modal-content::-webkit-scrollbar,
.reason-modal-content::-webkit-scrollbar {
    width: 8px;
}

.all-companies-modal-content::-webkit-scrollbar-track,
.reason-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.all-companies-modal-content::-webkit-scrollbar-thumb,
.reason-modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.all-companies-modal-content::-webkit-scrollbar-thumb:hover,
.reason-modal-content::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

/* Firefox */
.all-companies-modal-content,
.reason-modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
}

.evil-corps-main {
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

.evil-corps-hero {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.evil-corps-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,0,0,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: gridScroll 20s linear infinite;
}

@keyframes gridScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.evil-corps-title {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.evil-corps-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.evil-corps-intro {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.evil-corps-intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.evil-corps-content {
    padding: 4rem 0;
}

.corps-section {
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.corps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.corp-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.corp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.corp-card:hover::before {
    left: 100%;
}

.corp-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.3);
    transform: translateY(-5px);
}

.major-corp {
    border-color: rgba(255, 0, 0, 0.6);
    background: rgba(20, 0, 0, 0.8);
}

.major-corp::after {
    content: 'MAJOR THREAT';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: var(--bg-dark);
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
}

.corp-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.corp-ticker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.corp-type {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .evil-corps-title {
        font-size: 2.5rem;
    }

    .evil-corps-subtitle {
        font-size: 1.2rem;
    }

    .corps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .corp-card {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Glitch animation for major threats */
.major-corp:hover .corp-name {
    animation: textGlitch 0.3s ease-in-out;
}

@keyframes textGlitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

/* Blood effect for major corps */
.major-corp:hover {
    box-shadow:
        0 5px 20px rgba(255, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 0, 0, 0.3);
}

/* Loading and Error Messages */
.loading-message, .error-message {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    margin: 2rem 0;
}

.loading-message h3, .error-message h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.loading-message p, .error-message p {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

/* Special styling for BDS Boycott section */
.corps-section:first-child .section-title {
    color: #ff6b6b;
    font-size: 2.2rem;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.corps-section:first-child .section-title::after {
    background: linear-gradient(90deg, transparent, #ff6b6b, transparent);
}

.corps-section:first-child::before {
    content: '⚠️ PRIORITY BOYCOTT TARGETS ⚠️';
    display: block;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.5rem;
    margin: 0 auto 2rem;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 4px;
    max-width: 400px;
    letter-spacing: 1px;
}

/* Reason functionality styles */
.has-reason {
    cursor: pointer;
    position: relative;
}

.has-reason:hover {
    border-color: var(--primary-color) !important;
}


/* Tooltip styles */
.reason-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 300px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 10px;
}

.reason-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--primary-color);
}

.has-reason:hover .reason-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Modal styles */
.reason-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.reason-modal-content {
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.reason-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}

.reason-modal-close:hover {
    color: #fff;
}

.reason-modal-content h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.modal-ticker {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.modal-type {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.modal-reason {
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
}

.modal-alternatives-title {
    font-family: 'Orbitron', monospace;
    color: #00ff00;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-alternatives {
    font-family: 'Inter', sans-serif;
    color: #ccffcc;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
    background: rgba(0, 255, 0, 0.05);
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid #00ff00;
}

.alternative-category {
    margin-bottom: 0.75rem;
}

.alternative-category:last-child {
    margin-bottom: 0;
}

.alternative-category strong {
    color: #00ff00;
    font-weight: 600;
}

/* Alternatives sections */
.alternatives-section {
    margin-bottom: 1.5rem;
}

.alternatives-section:last-child {
    margin-bottom: 0;
}

.section-header {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.safe-header {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    border-left: 3px solid #00ff00;
}

.caution-header {
    color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid #ffa500;
}

.safe-section .alternative-category strong {
    color: #00ff00;
}

.caution-section .alternative-category {
    color: #ffcc99;
}

.caution-section .alternative-category strong {
    color: #ffa500;
}

/* Safety indicator styles */
.safety-safe {
    color: #00ff00;
    font-weight: bold;
}

.safety-caution {
    color: #ffa500;
    font-weight: bold;
}

.safety-mixed {
    color: #ffff00;
    font-weight: bold;
}

/* See All Companies Button */
.see-all-btn {
    background: linear-gradient(135deg, var(--primary-color), #cc0000);
    color: var(--bg-dark);
    border: none;
    padding: 1rem 2rem;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.see-all-btn:hover {
    background: linear-gradient(135deg, #cc0000, var(--primary-color));
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
    transform: translateY(-2px);
}

.see-all-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

/* All Companies Modal */
.all-companies-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.all-companies-modal-content {
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.all-companies-modal .reason-modal-close {
    position: absolute;
    top: 2px;
    right: 5px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    z-index: 10;
}

.all-companies-modal .reason-modal-close:hover {
    color: #fff;
}

.all-companies-modal-content h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
    margin-top: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 8px;
}

.companies-grid::-webkit-scrollbar {
    width: 8px;
}

.companies-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.companies-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.companies-grid::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

/* Firefox scrollbar for companies grid */
.companies-grid {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
}

.company-item {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 4px;
    padding: 0.75rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.company-item:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.companies-count {
    text-align: center;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.company-search {
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.company-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.company-search::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.search-results-count {
    text-align: center;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.company-item.hidden {
    display: none;
}

.company-item.highlight {
    background: rgba(255, 0, 0, 0.3);
    border-color: var(--primary-color);
}

/* Main Page Search */
.main-search-container {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
}

.main-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.main-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.8);
}

.main-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.main-search-results {
    text-align: center;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.5rem;
}

/* Search filtering styles */
.corps-section.search-hidden {
    display: none;
}

.corp-card.search-hidden {
    display: none;
}

.corp-card.search-highlight {
    border-color: var(--primary-color);
    box-shadow: 0 5px 25px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
}

.corp-card.search-highlight .corp-name {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Expanded search result styles */
.corp-card.search-expanded {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 0, 0, 0.3);
}

.search-reason {
    margin-bottom: 1rem;
}

.search-reason-title {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.search-reason-text {
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.search-alternatives {
    margin-top: 1rem;
}

.search-alternatives-title {
    font-family: 'Orbitron', monospace;
    color: #00ff00;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.search-alternatives-content {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
    padding: 0.75rem;
    border-left: 3px solid #00ff00;
}

.search-alternatives-text {
    font-family: 'Inter', sans-serif;
    color: #ccffcc;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.search-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    margin: 2rem 0;
}

.search-empty-state h3 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-empty-state p {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

/* Alternatives Search Results */
.alternatives-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 100, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid #00ff00;
}

.alternatives-results h4 {
    font-family: 'Orbitron', monospace;
    color: #00ff00;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alternative-match {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.alternative-match:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
}

.alternative-match:last-child {
    margin-bottom: 0;
}

.alternative-name {
    font-family: 'Inter', sans-serif;
    color: #00ff00;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.alternative-context {
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.alternative-evil-company {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.alternative-evil-company:hover {
    color: #ffffff;
}

/* Mobile responsive tooltip and modal */
@media (max-width: 768px) {
    .reason-tooltip {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        transform: none;
        max-width: none;
    }

    .reason-tooltip::after {
        display: none;
    }

    .reason-modal-content {
        margin: 20px;
        max-width: none;
        padding: 1.5rem;
    }

    .reason-modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-reason {
        font-size: 0.9rem;
    }
}