@import url(./import.css);

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-primary);
    /* font-family: "IBM Plex Sans JP", sans-serif; */
    /* font-family: "Google Sans", sans-serif; */
    /* font-family: "LINE Seed JP", "Noto Sans", sans-serif; */
    font-family: "Noto Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    scrollbar-width: none;

    user-select: none;
}

*::-webkit-scrollbar-thumb {
    display: none;
}

html {
    background: var(--primary);
}

html, body {
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

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

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-copy {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.8s forwards 0.2s;
}

.loader-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.8s forwards 0.4s;
}

.loader-line {
    width: 0;
    height: 2px;
    background-color: var(--accent);
    margin: 0 auto;
    animation: loadingLine 1.5s ease-in-out infinite;
}

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

@keyframes loadingLine {
    0% { width: 0; opacity: 0;}
    5% { opacity: 1;}
    50% { width: 100px; opacity: 1;}
    95% { opacity: 1;}
    100% { width: 0; opacity: 0;}
}


header, main, footer {
    width: 100%;
    position: relative;
    z-index: 10;
}

header {
    position: fixed;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(4px);
}

main {
    padding-top: var(--header-height);
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    background: var(--bg-gradient);
    transition: background 0.5s ease;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 80px);
    padding: 40px 10px;
    position: relative;
    overflow: visible;
    z-index: 5;
}

.hero-content {
    flex: 1;
    max-width: 650px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-primary) 100%);
    filter: contrast();
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 9;
    white-space: nowrap;
    width: 100vw;
}

.hero-description {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    background-color: var(--accent);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    padding: 10px 25px;
    font-size: 14px;
    text-align: center;
}

.btn-primary:hover {
    background-color: #7ab329;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
}


.hero-image-container {
    transition: 0.5s all ease;
    position: absolute;
    right: -150px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

.hero-image-blob {
    width: 100%;
    height: 100%;
    /* background: linear-gradient(45deg, #8fc830, #d4fc79); */
    background: linear-gradient(45deg, #8fc830, #9fd81d);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    opacity: 1;
    box-shadow: 0 30px 60px rgba(143, 200, 48, 0.2);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 18px;
    cursor: pointer;
    z-index: 100;
    padding: 2px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-15px);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Header Container Layout */
.header-container {
    padding: 0px 20px;
    padding-left: 5px;
    width: 100%;
    height: var(--header-height);
    display: flex;
    user-select: none;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    padding: 5px 10px;
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    perspective: 1000px;
}

.logo-container:hover {
    background-color: var(--accent-hover);
}

.logo-container span {
    font-size: 18px;
    font-family: 'Gotham', sans-serif;
    text-indent: 10px;
    transition: color 0.3s;
}

.logo-container .logo {
    width: 40px;
    height: 40px;
    mask-image: url(/assets/svg/logo.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    background-color: var(--accent);
    transition: background 0.3s, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 0.8);
    transform-style: preserve-3d;
}

.header-container .logo-container:hover > span { color: white; }
.header-container .logo-container:hover > .logo { background: white; transform: rotateX(360deg) rotateY(360deg) rotateZ(180deg) scale(0.75); }

/* Desktop Navigation Style */
.header-navigation {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 20px;
}

.header-navigation ul {
    list-style: none;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.header-navigation ul li {
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

.header-navigation ul li a {
    display: block;
    padding: 10px 15px;
    color: inherit;
    text-decoration: none;
}

.header-navigation ul li:hover a {
    color: var(--accent);
}

/* Lang & Theme Dropdown Desktop */
.lang-dropdown, .theme-dropdown {
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.lang-current, .theme-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(128, 128, 128, 0.1);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid transparent;
}

.lang-current i:first-child, .theme-current i:first-child {
    font-size: 18px;
    color: var(--accent);
}

.lang-current i.bx-chevron-down, .theme-current i.bx-chevron-down {
    font-size: 14px;
    opacity: 0.5;
}

.lang-dropdown:hover .lang-current, .theme-dropdown:hover .theme-current {
    background: rgba(128, 128, 128, 0.15);
    border-color: var(--accent);
}

.lang-options, .theme-options {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: var(--primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    min-width: 150px;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] .lang-options, [data-theme="dark"] .theme-options {
    background: #151a0d;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
}

.lang-dropdown:hover .lang-options, .theme-dropdown:hover .theme-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-options li, .theme-options li {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.lang-options li:hover, .theme-options li:hover {
    background: var(--accent);
    color: #222;
}

.lang-options li:hover i, .theme-options li:hover i {
    color: #222;
}
/* SVG container visible on all devices */
.menu-bg-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: block;
}

#menu-bg-svg {
    width: 100%;
    height: 100%;
}

#menu-blob-path {
    fill: var(--accent);
    opacity: 0; /* JSで制御 */
    transition: opacity 0.3s ease;
}

/* Desktop descriptions (hidden) */
.header-navigation ul li::after {
    display: none;
}

/* Introduce Section */
.introduce {
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.intro-profile {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 20px;
    font-weight: 800;
}

.section-desc {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.sub-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-title::before {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

/* PickUP card */
.pickup-grid {
    display: grid;
    gap: 30px;
}

.pickup-card {
    background: rgba(var(--primary-rgb, 255, 255, 255), 0.05);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-height: 300px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pickup-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.card-image {
    flex: 1;
    min-width: 40%;
    justify-content: center;
    align-items: center;
    display: flex;
}

.card-content {
    flex: 1.2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.tag {
    background: var(--accent);
    color: #222;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    width: fit-content;
    text-transform: uppercase;
}

.tag-dev {
    background: #2955b3;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    width: fit-content;
    text-transform: uppercase;
}

/* Apps grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.app-item {
    background: rgba(128, 128, 128, 0.05);
    padding: 25px;
    border-radius: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid transparent;
    position: relative;
    cursor: pointer;
}

.app-item:hover {
    background: rgba(var(--accent-rgb, 143, 200, 48), 0.1);
    border-color: var(--accent);
    transform: scale(1.02);
}

.app-icon {
    font-size: 32px;
    color: var(--accent);
    background: rgba(var(--accent-rgb, 143, 200, 48), 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    aspect-ratio: 1/1;
}

.app-info h4 {
    margin-bottom: 5px;
}

.app-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.recommend {
    background: rgba(var(--accent-rgb, 143, 200, 48), 0.05);
    border: 1px solid rgba(var(--accent-rgb, 143, 200, 48), 0.2);
}

.recommend-tag {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 10px;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
}

.all-apps-section {
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .pickup-card {
        flex-direction: column;
    }
    .card-image {
        height: 200px;
    }
}

/* Footer Styling */
footer {
    padding: 60px 0 40px;
    border-top: 1px solid rgba(128, 128, 128, 0.1);
    background: rgba(var(--primary-rgb), 0.5);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-left .logo-container {
    padding: 0;
    pointer-events: none;
}

.copyright {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 22px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    opacity: 0.6;
}

.social-links a:hover {
    color: var(--accent);
    opacity: 1;
    transform: scale(1.2);
}

/* Theme Dropdown in Footer (Override positioning to open upwards if needed, or keep standard if enough space) */
.theme-dropdown .theme-options {
    bottom: 100%;
    top: auto;
    margin-bottom: 12px;
    margin-top: 0;
}

#current-theme-label {
    text-transform: capitalize;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .footer-left {
        align-items: center;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 25px;
    }
}

@keyframes hamburgerAnimation {
    0% {
        opacity: 0;
        transform: rotate(90deg) scale(0);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Mobile & Full Screen Menu styles */
@media (max-width: 600px) {
    .hamburger {
        display: flex;
        animation: hamburgerAnimation forwards 0.3s;
    }

    .header-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1);
        z-index: 50;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        padding: 40px;
    }

    [data-theme="dark"] .header-navigation {
        background-color: rgba(10, 15, 2, 0.95);
    }

    .header-navigation.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        overflow-y: scroll;
    }

    .header-navigation ul {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-bottom: 60px;
    }

    .header-navigation ul li {
        width: 100%;
        max-width: 200px;
        text-align: center;
        font-size: clamp(32px, 8vw, 64px);
        font-weight: 700;
        padding: 15px 0;
        opacity: 0;
        transform: translateY(30px);
    }

    .header-navigation ul li::after {
        display: block;
        content: attr(data-desc);
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 14px;
        font-weight: 400;
        color: var(--accent);
        letter-spacing: 0.2em;
        text-transform: uppercase;
        opacity: 0.7;
    }

    .header-navigation.active ul li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .lang-dropdown, .theme-dropdown {
        margin-top: 20px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.6s ease 0.6s;
        width: 100%;
    }

    .header-navigation.active .lang-dropdown, .header-navigation.active .theme-dropdown {
        opacity: 1;
        transform: translateY(0);
    }

    /* Footer overrides for mobile to keep dropdowns visible */
    footer .lang-dropdown, footer .theme-dropdown {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-top: 0;
        width: auto;
    }

    footer .lang-current, footer .theme-current {
        display: flex !important;
    }

    footer .theme-current, footer .lang-current {
        display: flex !important;
        background: rgba(128, 128, 128, 0.1) !important;
        border: 1px solid transparent !important;
        padding: 8px 14px !important;
        border-radius: 20px !important;
    }

    footer .theme-dropdown:hover .theme-current, footer .lang-dropdown:hover .lang-current {
        border-color: var(--accent) !important;
        background: rgba(128, 128, 128, 0.15) !important;
    }

    footer .theme-current i, footer .theme-current span,
    footer .lang-current i, footer .lang-current span {
        color: var(--text-primary) !important;
    }

    /* Hide theme options but keep lang options for mobile */
    footer .theme-options {
        display: none !important;
    }

    footer .lang-options {
        display: block !important;
        position: absolute !important;
        bottom: 100% !important;
        top: auto !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(15px) !important;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        background: var(--primary) !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid rgba(128, 128, 128, 0.1) !important;
        z-index: 100 !important;
        margin-bottom: 12px !important;
        margin-top: 0 !important;
        flex-wrap: wrap;
    }

    footer .lang-dropdown:hover .lang-options {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    footer .theme-current #theme-chevron {
        display: none !important; /* Hide chevron for toggle functionality */
    }

    footer .lang-current i.bx-chevron-down {
        display: block !important;
        opacity: 0.5 !important;
    }

    [data-theme="dark"] footer .theme-options,
    [data-theme="dark"] footer .lang-options {
        background: #151a0d !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6) !important;
    }

    footer .theme-options div, footer .lang-options li {
        padding: 12px 20px !important;
        border: none !important;
        border-radius: 0 !important;
        color: var(--text-primary) !important;
        justify-content: flex-start !important;
        min-width: 150px !important;
        font-size: 14px !important;
        background: none !important;
    }

    footer .theme-options div:hover, footer .lang-options li:hover {
        background: var(--accent) !important;
        color: white !important;
    }

    .lang-options, .theme-options {
        position: static;
        display: flex;
        gap: 12px;
        background: none !important;
        box-shadow: none !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 10px;
        justify-content: center;
        border: none !important;
    }

    .lang-options li, .theme-options div {
        padding: 6px 12px;
        border-radius: 20px;
        border: 1px solid var(--accent);
        color: var(--accent);
        font-weight: 700;
        font-size: 13px;
        min-width: auto;
    }

    .lang-current, .theme-current {
        display: none;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Media Queries for Hero */
@media (max-width: 900px) {

    .hero-image-container {
        right: -200px;
        width: 500px;
        height: 500px;
        opacity: 0.6;
    }
}

@media (max-width: 600px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-title {
        white-space: unset !important;
        font-size: 32px;
    }
    
    .hero-image-container {
        right: calc(50vw - 200px);
        top: 50%;
        width: 400px;
        height: 400px;
        opacity: 0.4;
    }
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% / 60% 30% 70% 40%; }
}
