/* ===== IT転職エージェントランキングページ (Complete System) ===== */

/* ---------- Hero ---------- */
.ranking-hero {
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 9rem 2rem 5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(10,10,15,0.96)), url('../images/ranking_hero_bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.ranking-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(0,212,255,.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(139,92,246,.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: .5rem 1.5rem;
    border: 1px solid var(--accent-cyan);
    border-radius: 30px;
    color: var(--accent-cyan);
    font-size: .8rem;
    letter-spacing: .15em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
    background: rgba(0,212,255,0.05);
}

.hero-desc {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: clamp(1rem,1.6vw,1.15rem);
    line-height: 1.8;
}

.hero-updated {
    color: var(--text-muted);
    font-size: .85rem;
    background: rgba(255,255,255,0.04);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1rem;
    border-radius: 20px;
}

/* ---------- Sticky Category Tab Nav ---------- */
.cat-nav {
    position: sticky;
    top: 72px;
    z-index: 100;
    background: rgba(10,10,10,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.cat-nav-inner {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
}

.cat-tab {
    flex: 1;
    padding: 1.2rem;
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all .3s;
    line-height: 1.5;
}

.cat-tab:hover { color: var(--accent-cyan); }
.cat-tab.active { color: var(--accent-cyan); background: rgba(0,212,255,0.05); border-bottom-color: var(--accent-cyan); }
.cat-tab-sub { font-size: .7rem; font-weight: 400; opacity: .6; }

/* ---------- Section Heading ---------- */
.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-subtle);
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.section-heading h2 { font-size: clamp(1.3rem,3vw,1.8rem); margin: 0; }
.section-count { color: var(--text-muted); font-size: .85rem; margin-left: auto; flex-shrink: 0; }

/* ---------- Main Container ---------- */
.ranking-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
}

/* ---------- Category Switching ---------- */
.category-content { display: none; }
.category-content.active { display: block; }

/* ---------- Comparison Table ---------- */
.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.compare-table thead th {
    background: rgba(0,212,255,0.1);
    color: var(--accent-cyan);
    padding: 1rem .8rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.compare-table tbody tr {
    transition: background .2s;
    cursor: pointer;
}

.compare-table tbody tr:hover {
    background: rgba(0,212,255,0.03);
}

.compare-table td {
    padding: 1.2rem .8rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    text-align: center;
}

.compare-table tbody tr:last-child td { border-bottom: none; }

.rank-cell {
    font-weight: 800;
    font-size: 1.2rem;
    width: 50px;
}

.rank-cell.gold { color: #FFD700; }
.rank-cell.silver { color: #C0C0C0; }
.rank-cell.bronze { color: #CD7F32; }

.name-cell {
    text-align: left;
    padding-left: 1rem;
}

.name-cell strong { font-size: .95rem; }
.tagline { font-size: .72rem; color: var(--text-muted); }

.star-score {
    color: #fbbf24;
    font-weight: 700;
    font-size: 1.1rem;
}

.star-score i { margin-right: .2rem; font-size: .85rem; }

.jobs-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid rgba(0,212,255,.35);
    background: rgba(0,212,255,.04);
    color: var(--accent-cyan);
    font-weight: 800;
    font-size: .78rem;
    line-height: 1.2;
    flex-direction: column;
}

.jobs-circle span { font-size: .6rem; font-weight: 400; opacity: .7; }

.table-cta {
    display: inline-block;
    background: var(--gradient-primary);
    color: #fff;
    padding: .55rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    transition: all .2s;
    white-space: nowrap;
}

.table-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,212,255,.2);
    color: #fff;
}

/* ---------- Agent Card ---------- */
.agent-card {
    position: relative;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 2.5rem;
    overflow: hidden;
    transition: all .4s cubic-bezier(.4,0,.2,1);
}

.agent-card:hover {
    border-color: rgba(0,212,255,.3);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    transform: translateY(-4px);
}

/* Rank Badge */
.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    padding: 6px 0 0 8px;
    background: linear-gradient(135deg, rgba(0,212,255,.6), rgba(139,92,246,.6));
}

.rank-badge.gold { background: linear-gradient(135deg, #FFD700, #FFA500); }
.rank-badge.silver { background: linear-gradient(135deg, #C0C0C0, #8a8a8a); }
.rank-badge.bronze { background: linear-gradient(135deg, #CD7F32, #a0522d); }

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 2rem 1rem 4.5rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.card-icon.cyan { background: rgba(0,212,255,.12); color: var(--accent-cyan); }
.card-icon.purple { background: rgba(139,92,246,.12); color: #a78bfa; }
.card-icon.gold { background: rgba(255,215,0,.12); color: #FFD700; }

.card-titles h3 {
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .25rem;
}

.card-subtitle { color: var(--text-secondary); font-size: .88rem; }

.badge {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 12px;
    font-size: .7rem;
    font-weight: 600;
    margin-top: .4rem;
}

.badge.expert { background: rgba(139,92,246,.15); color: #a78bfa; border: 1px solid rgba(139,92,246,.3); }
.badge.all { background: rgba(0,212,255,.1); color: var(--accent-cyan); border: 1px solid rgba(0,212,255,.2); }
.badge.highclass { background: rgba(255,215,0,.1); color: #FFD700; border: 1px solid rgba(255,215,0,.2); }

/* Highlights */
.card-highlights {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}

.chip {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .8rem;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 500;
    background: rgba(0,212,255,.06);
    color: var(--accent-cyan);
    border: 1px solid rgba(0,212,255,.12);
}

.chip i { font-size: .7rem; }

/* Info Grid */
.card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0 2rem 1.5rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}

.info-item {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}

.info-item:nth-child(2n) { border-right: none; }
.info-item:nth-last-child(-n+2) { border-bottom: none; }

.info-item h4 {
    font-size: .72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .3rem;
    letter-spacing: .03em;
}

.info-item div { font-weight: 600; font-size: .88rem; }

/* Recommend */
.recommend-section { padding: 0 2rem; margin-bottom: 1.2rem; }

.recommend-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.recommend-title i { color: var(--accent-cyan); }

.recommend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommend-list li {
    position: relative;
    padding: .35rem 0 .35rem 1.3rem;
    color: var(--text-secondary);
    font-size: .85rem;
    line-height: 1.5;
}

.recommend-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: 700;
}

/* Editor Comment */
.editor-box {
    background: rgba(255,255,255,.03);
    border-left: 3px solid var(--accent-cyan);
    padding: 1rem 1.2rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 2rem 1.2rem;
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.editor-title {
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
}

/* Reviews Toggle & Panel */
.reviews-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: .8rem;
    cursor: pointer;
    transition: all .3s;
    margin: 0 2rem .8rem;
    width: calc(100% - 4rem);
}

.reviews-toggle:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.reviews-toggle .chevron { margin-left: auto; transition: transform .3s; }
.reviews-toggle.open .chevron { transform: rotate(180deg); }

.reviews-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    padding: 0 2rem;
}

.reviews-panel.open { max-height: 600px; }

.review {
    padding: .8rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: .6rem;
    font-size: .82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.review-meta {
    color: var(--text-muted);
    font-size: .72rem;
    margin-bottom: .3rem;
}

/* CTA */
.card-cta {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
}

.main-cta-btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: #fff;
    padding: 1.1rem 3rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}

.main-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,212,255,.25);
    color: #fff;
}

.main-cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    transition: left .5s;
}

.main-cta-btn:hover::after { left: 100%; }

/* ---------- Footer ---------- */
footer {
    background: var(--bg-secondary, #0f172a);
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 2rem 1.5rem;
    margin-top: auto;
}

.footer-content { max-width: 1100px; margin: 0 auto; }

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-logo { font-size: 1.1rem; font-weight: 700; color: var(--accent-cyan); margin-bottom: .4rem; }
.footer-tagline { font-size: .8rem; color: var(--text-muted); }

.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .9rem;
    transition: color .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.footer-nav a:hover { color: var(--accent-cyan); }
.footer-copy { font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; }
.footer-desc { font-size: .75rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- Scroll Reveal ---------- */
.sr {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}

.sr.visible {
    opacity: 1;
    transform: none;
}

/* ---------- Hamburger (inline) ---------- */
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 10001; flex-shrink: 0; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary,#e2e8f0); border-radius: 2px; transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, width .25s ease; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hamburger { display: flex !important; }

    .nav-links {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 75vw !important;
        max-width: 300px !important;
        height: 100vh !important;
        background: var(--bg-card, #1e293b) !important;
        border-left: 1px solid rgba(255,255,255,.08) !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 5rem 1.5rem 2rem !important;
        gap: 0 !important;
        z-index: 9999 !important;
        transition: right .35s cubic-bezier(.4,0,.2,1) !important;
        box-shadow: -4px 0 24px rgba(0,0,0,.4) !important;
        overflow-y: auto !important;
    }

    .nav-links.open { right: 0 !important; }

    .nav-links li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255,255,255,.06) !important;
    }

    .nav-links li a {
        display: block !important;
        padding: 1rem .5rem !important;
        font-size: 1rem !important;
        width: 100% !important;
        color: var(--text-primary) !important;
        text-decoration: none;
    }

    .card-header { flex-direction: column; align-items: flex-start; padding: 2rem 1.5rem 1rem 3.5rem; }
    .card-highlights { padding: 0 1.5rem; }
    .card-info-grid { margin: 0 1.5rem 1.5rem; grid-template-columns: 1fr; }
    .info-item { border-right: none !important; }
    .recommend-section { padding: 0 1.5rem; }
    .editor-box { margin: 1rem 1.5rem 1rem; }
    .reviews-toggle { margin: 0 1.5rem .8rem; width: calc(100% - 3rem); }
    .reviews-panel { padding: 0 1.5rem; }
    .card-cta { padding: 1.5rem 1.5rem 2rem; }
    .ranking-main { padding: 2rem 1rem 1rem; }

    .compare-table { display: block; overflow-x: auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
    .footer-nav ul { align-items: center; }
    .footer-nav a { justify-content: center; }
}

/* =========================================================================
   NEW GSAP & CYBER ANIMATIONS
   ========================================================================= */

/* ---------- Preloader ---------- */
#tech-loader {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
}

.loader-content {
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.loader-glitch {
    font-size: 1.2rem;
    color: var(--accent-cyan);
    margin-bottom: 2rem;
    position: relative;
    letter-spacing: 0.1em;
}

.loader-glitch::before,
.loader-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
}

.loader-glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.loader-glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

.loader-bar-bg {
    height: 2px;
    background: rgba(255,255,255,0.1);
    position: relative;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.loader-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.loader-perc {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* ---------- Custom Cyber Cursor ---------- */
@media (pointer: fine) {
    body { cursor: none; }
    a, button, .cat-tab { cursor: none; }

    #cyber-cursor {
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 100000;
        mix-blend-mode: exclusion;
    }

    .cursor-dot {
        position: absolute;
        width: 6px;
        height: 6px;
        background: #fff;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s;
    }

    .cursor-ring {
        position: absolute;
        width: 36px;
        height: 36px;
        border: 1px solid var(--accent-cyan);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
    }

    .cursor-hover .cursor-dot {
        opacity: 0;
    }
    .cursor-hover .cursor-ring {
        width: 50px;
        height: 50px;
        background: rgba(0, 212, 255, 0.1);
        border-color: rgba(0, 212, 255, 0.8);
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    }
}

/* ---------- Glitch Utility Classes ---------- */
.is-glitching {
    animation: rgb-shift 0.3s ease;
}

@keyframes rgb-shift {
    0% { filter: drop-shadow(4px 0 0 rgba(255,0,0,0.5)) drop-shadow(-4px 0 0 rgba(0,255,255,0.5)); transform: translate(1px, 1px); }
    20% { filter: drop-shadow(-3px 0 0 rgba(255,0,0,0.5)) drop-shadow(3px 0 0 rgba(0,255,255,0.5)); transform: translate(-1px, 0); }
    40% { filter: drop-shadow(2px 0 0 rgba(255,0,0,0.5)) drop-shadow(-2px 0 0 rgba(0,255,255,0.5)); transform: translate(0, -1px); }
    60% { filter: drop-shadow(-1px 0 0 rgba(255,0,0,0.5)) drop-shadow(1px 0 0 rgba(0,255,255,0.5)); transform: translate(1px, 0); }
    80% { filter: drop-shadow(1px 0 0 rgba(255,0,0,0.5)) drop-shadow(-1px 0 0 rgba(0,255,255,0.5)); transform: translate(-1px, 1px); }
    100% { filter: none; transform: translate(0, 0); }
}

/* ---------- GSAP Scroll Reveal Overrides ---------- */
/* Hide GSAP elements initially so there's no layout flashing */
.gsap-reveal {
    opacity: 0;
    visibility: hidden;
}

/* Magnetic Button Container */
.magnetic-wrap {
    display: inline-block;
}

/* Scanline Effect */
.scanline-btn {
    position: relative;
    overflow: hidden;
}
.scanline-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
}
.scanline-btn:hover::before {
    animation: scanline 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes scanline {
    0% { left: -100%; }
    100% { left: 200%; }
}
