/* ====== Global ====== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans JP", "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "メイリオ", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    padding: 10px;
    margin: 0;
    background: #f5f7fa;
    color: #184c81;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

a:hover {
    opacity: 0.8;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== Header ====== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #157577;
    margin: 10px 0;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    transition: all 0.3s ease-in-out;
}

.nav a {
    margin: 0 15px;
    font-weight: 500;
    color: #184c81;
    padding: 10px;
    display: inline-block;
}

.auth-links a {
    background: #0066cc;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
}

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    background: #157577;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(5px);
}

.nav-toggle.open .hamburger {
    background: transparent;
}

.nav-toggle.open .hamburger::before {
    transform: translateY(0) rotate(45deg);
}

.nav-toggle.open .hamburger::after {
    transform: translateY(-3px) rotate(-45deg);
}

/* ====== Hero Section ====== */
.hero {
    background: linear-gradient(rgba(0, 40, 90, 0.6), rgba(0, 40, 90, 0.6)),
        url("/static/hero-bg.png") center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 80px 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    min-width: 0;
}

.search-form button {
    padding: 14px 24px;
    border: none;
    background: #ff6600;
    color: #fff;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    cursor: pointer;
}

/* ====== Featured Jobs ====== */
.featured-jobs {
    margin: 60px auto;
    width: 100%;
}

.featured-jobs h2 {
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.job-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: 0.3s;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.job-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #157577;
}

.job-card .company {
    font-weight: 500;
    margin-bottom: 5px;
}

.job-card .location,
.job-card .salary {
    font-size: 14px;
    color: #666;
}

.job-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.job-category {
    background: #e8f4ff;
    color: #157577;
    padding: 4px 8px;
    border-radius: 4px;
}

.job-tag {
    background: #e8f4ff;
    color: #157577;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ====== Categories ====== */
.categories {
    margin: 60px auto;
    text-align: center;
    width: 100%;
}

.categories h2 {
    font-size: 26px;
    margin-bottom: 25px;
}

.category-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-list a {
    background: #157577;
    color: #fff;
    padding: 12px 18px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.category-list a:hover {
    background: #004999;
}

/* ====== View All ====== */
.view-all {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.view-all a {
    color: #ff6600;
    font-weight: 600;
    font-size: 16px;
    transition: 0.3s;
}

.view-all a:hover {
    color: #ffa14d;
}

/* ====== Job Detail Section ====== */
.job-detail {
    margin: 20px auto;
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.job-main {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.job-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    height: fit-content;
}

.job-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.job-title {
    font-size: 28px;
    color: #157577;
    margin-bottom: 10px;
}

.job-company {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f7ff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.job-section {
    margin-bottom: 30px;
}

.job-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #157577;
    border-bottom: 2px solid #f0f7ff;
    padding-bottom: 8px;
}

.job-section p {
    margin-bottom: 15px;
    white-space: pre-line;
}

.apply-btn {
    text-align: center;
    margin: 30px 0 15px;
}

.apply-btn a {
    background: #ff6600;
    color: #fff;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    width: 100%;
}

.job-info {
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f7ff;
}

.info-label {
    font-weight: 500;
    color: #666;
}

.info-value {
    font-weight: 600;
}

.social-contacts {
    margin: 20px 0;
}

.social-contacts h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #157577;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 9.5rem;
    padding: 5px 5px;
    border-radius: 8px;
    font-weight: 500;
    color: white;
    transition: 0.3s;
}

.social-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.line-btn {
    background: #00B900;
}

.telegram-btn {
    background: #2AABEE;
}

.discord-btn {
    background: #5865F2;
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.facebook-btn {
    background: #1877F2;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
    color: #157577;
    font-weight: 500;
}

/* ====== Footer ====== */
.site-footer {
    background: #0d1b2a;
    color: #bbb;
    padding: 30px 20px;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    margin: 0;
    font-size: 14px;
}

/* ====== No Jobs Message ====== */
.no-jobs {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* ====== Mobile Responsive ====== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .site-header .container {
        flex-direction: row;
        padding: 10px 15px;
        align-items: center;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background: #fff;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 20px 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        margin: 10px 0;
        font-size: 16px;
        width: 100%;
        text-align: center;
        padding: 15px;
        border-bottom: 1px solid #eaeaea;
    }

    .auth-links {
        margin-left: auto;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .search-form button {
        border-radius: 8px;
    }

    .job-grid {
        grid-template-columns: 1fr;
    }

    .category-list {
        flex-direction: column;
        align-items: center;
    }

    .category-list a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .job-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .job-main,
    .job-sidebar {
        padding: 20px;
    }

    .job-title {
        font-size: 24px;
    }

    .job-company {
        font-size: 18px;
    }

    .meta-item {
        font-size: 13px;
        padding: 6px 12px;
    }

    .social-buttons {
        flex-direction: column;
    }

    .category-list {
        justify-content: flex-start;
        /* 改为flex-start以实现两列布局 */
        gap: 12px;
    }

    .category-list a {
        width: calc(50% - 6px);
        /* 确保一行两个按钮 */
        min-width: auto;
        flex: 0 0 calc(50% - 6px);
        /* 防止按钮伸缩 */
        box-sizing: border-box;
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .nav a {
        font-size: 14px;
        padding: 12px;
    }

    .job-meta {
        flex-direction: column;
        gap: 10px;
    }

    .job-title {
        font-size: 22px;
    }

    .featured-jobs,
    .categories {
        margin: 10px auto;
    }


}