/* Wrapper & Container */
#wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#container {
    flex: 1;
    margin: 0 auto;
    width: 100%;
}

/* Contents Layout */
#contents {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contents_inline {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

@media (max-width:768px) {
    .contents_inline {
        display: block;
    }
}

.contents_m {
    min-height: 400px;
}

.contents_s {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 120px;
}

/* Contents Box */
.contents_box {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
}

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

.contents_box h2 {
    background: linear-gradient(135deg, var(--main-color) 0%, #1a4bb8 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.contents_box .body {
    padding: 1.5rem;
}

/* News Box */
.news .body p.more {
    text-align: right;
    margin-top: 1rem;
}

.news .body p.more a {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.news .body p.more a:hover {
    color: var(--button-color);
}

/* New Projects Box */
.new .body p {
    text-align: center;
    color: var(--gray);
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

/* Search Forms */
.free .body form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.free input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 200px;
}

.free input[type="text"]:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(36, 95, 229, 0.1);
}

.search_button {
    background: var(--button-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    white-space: nowrap;
}

.search_button:hover {
    background: #d66013;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Category Lists */
.form .body ul,
.items_type .body ul,
.top_search.character .body ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}

.form .body li,
.items_type .body li,
.top_search.character .body li {
    list-style: none;
}

.form .body a,
.items_type .body a,
.top_search.character .body a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--gray-dark);
    background: var(--light-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.form .body a:hover,
.items_type .body a:hover,
.top_search.character .body a:hover {
    background: var(--main-color);
    color: var(--white);
    border-left-color: var(--button-color);
    transform: translateX(4px);
}

/* Login Box */
.login .body form {
    margin-bottom: 1.5rem;
}

.login dl {
    margin-bottom: 1rem;
}

.login dt {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-dark);
}

.login dd {
    margin-bottom: 1rem;
}

.login input[type="text"],
.login input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.login input[type="text"]:focus,
.login input[type="password"]:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(36, 95, 229, 0.1);
}

.login .check {
    margin: 1rem 0;
}

.login .check label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.login input[type="submit"] {
    width: 100%;
    background: var(--main-color);
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.login input[type="submit"]:hover {
    background: #1a4bb8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.login .body>p:last-child {
    text-align: center;
    margin-top: 1rem;
}

.login .body>p:last-child a {
    color: var(--button-color);
    text-decoration: none;
    font-weight: 500;
}

/* History Box */
.history h2 {
    position: relative;
}

.history .more {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.history .more a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.history .more a:hover {
    color: var(--white);
}



/* Responsive Design */
@media (max-width: 768px) {


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

    #contents {
        padding: 1rem;
    }

    .contents_s {
        position: static;
    }

    .free .body form {
        flex-direction: column;
        align-items: stretch;
    }

    .form .body ul,
    .items_type .body ul,
    .top_search.character .body ul {
        grid-template-columns: 1fr;
    }


}

@media (max-width: 480px) {
    .contents_box h2 {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }

    .contents_box .body {
        padding: 1rem;
    }

    .switch a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .head_menu a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Hero Section */
#hero {
    background-image: url('/common/img/custom/nobody/kaisyu.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* background: linear-gradient(135deg, var(--main-color) 0%, #1a4bb8 100%); */
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

@media (max-width:768px) {
    #hero {
        background-position: 12% 50%;
    }
}

#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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="60" cy="40" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.5;
}

.hero_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero_title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero_subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero_buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width:768px) {
    .hero_buttons {
        justify-content: center;
    }

}

.btn_primary,
.btn_secondary {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn_primary {
    background: var(--button-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(234, 115, 23, 0.3);
}

.btn_primary:hover {
    background: #d66013;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 115, 23, 0.4);
}

.btn_secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn_secondary:hover {
    background: var(--white);
    color: var(--main-color) !important;
    transform: translateY(-2px);
}

.btn_primary.large,
.btn_secondary.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

@media (max-width:768px) {

    .btn_primary.large,
    .btn_secondary.large {
        justify-content: center;
    }

}

.hero_visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero_card {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero_card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.card_icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.card_icon img {
    max-width: 70px;
}

.card_content {
    text-align: left;
}

.hero_card h3 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 1.6rem;
}

.hero_card p {

    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width:768px) {
    .hero_card h3 {
        font-size: 1.2rem;
    }

    .hero_card p {
        font-size: 1rem;
    }
}

/* Features Section */
#features {
    padding: 5rem 0;
    background: var(--white);
}

.section_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section_title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--gray-dark);
    margin-bottom: 3rem;
    font-weight: 700;
}

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

.feature_item {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature_item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature_icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature_item h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.feature_item p {
    color: var(--gray);
    line-height: 1.6;
}

/* Stats Section */
#stats {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e3e7f3 100%);
    padding: 4rem 0;
}

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

.stat_item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat_number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 0.5rem;
}

.stat_label {
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 1.1rem;
}

/* How it Works Section */
#how_it_works {
    padding: 5rem 0;
    background: var(--white);
}

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

.step_item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.step_item:hover {
    background: var(--light-bg);
    transform: translateY(-5px);
}

.step_number {
    background: var(--main-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step_content h3 {
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.step_content p {
    color: var(--gray);
    line-height: 1.6;
}

#fixedBg {
    background: url('/common/img/custom/nobody/fixedbg.jpg') no-repeat center center;
    background-position: center;
    background-size: cover;
    height: 300px;
    width: 100%;
    background-attachment: fixed;
}

@media (max-width:768px) {
    #fixedBg {
        background-attachment: inherit;
    }
}

/* CTA Section */
#cta {
    background: linear-gradient(135deg, var(--button-color) 0%, #d66013 100%);
    padding: 4rem 0;
    color: var(--white);
    text-align: center;
}

.cta_content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta_content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta_buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta_buttons .btn_primary {
    background: var(--white);
    color: var(--button-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta_buttons .btn_primary:hover {
    background: var(--light-bg);
    color: var(--button-color);
}

.cta_buttons .btn_secondary {
    border-color: var(--white);
    color: var(--white);
}

/* Animation for page load */
.contents_box,
.feature_item,
.stat_item,
.step_item {
    animation: fadeInUp 0.6s ease-out;
}

.hero_card:nth-child(1) {
    animation-delay: 0.1s;
}

.hero_card:nth-child(2) {
    animation-delay: 0.2s;
}

.hero_card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature_item:nth-child(1) {
    animation-delay: 0.1s;
}

.feature_item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature_item:nth-child(3) {
    animation-delay: 0.3s;
}

.feature_item:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive for Landing Sections */
@media (max-width: 768px) {
    .hero_content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 15px;
    }

    .hero_title {
        font-size: 3rem;
    }

    .hero_subtitle {
        font-size: 1.1rem;
    }

    .section_title {
        font-size: 2rem;
    }

    .features_grid {
        grid-template-columns: 1fr;
    }

    .stats_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps_container {
        grid-template-columns: 1fr;
    }

    .step_item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .cta_content h2 {
        font-size: 2rem;
    }

    .cta_buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn_primary,
    .btn_secondary {
        width: 280px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {

    #hero,
    #features,
    #how_it_works {
        padding: 3rem 0;
    }

    #stats,
    #cta {
        padding: 2.5rem 0;
    }

    .hero_title {
        font-size: 3rem;
    }

    .section_title {
        font-size: 1.6rem;
    }

    .stats_grid {
        grid-template-columns: 1fr;
    }

    .stat_number {
        font-size: 2.5rem;
    }
}

/* Hover effects for interactive elements */
a,
button,
input[type="submit"],
.search_button {
    position: relative;
    overflow: hidden;
}

a::before,
button::before,
input[type="submit"]::before,
.search_button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    z-index: 0;
}

a:hover::before,
button:hover::before,
input[type="submit"]:hover::before,
.search_button:hover::before {
    width: 300px;
    height: 300px;
}

a>*,
button>*,
input[type="submit"]>*,
.search_button>* {
    position: relative;
    z-index: 1;
}