:root {
    --bg-color: #121212;
    --accent-green: #39FF14;
    --accent-purple: #800080;
    --text-color: #E0E0E0;
    --bg-overlay: rgba(0, 0, 0, 0.85);

    --font-heading: 'Noto Sans JP', sans-serif;
    /* Removed Orbitron from heading to avoid mixed fonts with Japanese text */
    --font-pixel: 'DotGothic16', sans-serif;
    /* Switched to DotGothic16 for Japanese support in pixel style */
    --font-body: 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
}

/* Links */
a {
    color: var(--accent-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-purple);
    text-shadow: 0 0 8px rgba(128, 0, 128, 0.6);
}

/* Background grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: var(--bg-color);
    background-image:
        linear-gradient(rgba(225, 255, 220, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(225, 255, 220, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 1;
    pointer-events: none;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.glitch-title {
    font-family: var(--font-pixel);
    font-size: 1.8rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px var(--accent-purple);
}

@media (min-width: 768px) {
    .glitch-title {
        font-size: 2.5rem;
    }
}

/* Glitch Animation */
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-green);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-purple);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(85px, 9999px, 90px, 0);
    }

    40% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    80% {
        clip: rect(90px, 9999px, 70px, 0);
    }

    100% {
        clip: rect(35px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(15px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(70px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(25px, 9999px, 95px, 0);
    }

    60% {
        clip: rect(45px, 9999px, 65px, 0);
    }

    80% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(80px, 9999px, 15px, 0);
    }
}

/* Main Container */
.terms-container {
    background-color: var(--bg-overlay);
    border: 1px solid var(--accent-purple);
    padding: 2rem;
    position: relative;
    box-shadow: 0 0 20px rgba(128, 0, 128, 0.2);
    backdrop-filter: blur(5px);
}

/* Corner Decorations */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-green);
    border-style: solid;
    pointer-events: none;
}

.corner-tl {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.corner-tr {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.corner-bl {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.corner-br {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

section {
    margin-bottom: 2.5rem;
}

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

h2 {
    font-family: var(--font-heading);
    color: var(--accent-green);
    border-bottom: 1px solid var(--accent-purple);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
    font-size: 1.4rem;
}

h3 {
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

h3 .icon {
    color: var(--accent-purple);
    margin-right: 0.5rem;
    font-size: 0.8em;
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style: none;
    padding-left: 0.5rem;
}

li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: var(--accent-purple);
    font-size: 0.8em;
    top: 0.2em;
}

.highlight {
    color: var(--accent-green);
    font-weight: bold;
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 3rem;
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    opacity: 0.7;
}

.main-footer p {
    margin-bottom: 0.5rem;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .terms-container {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .logo-container img {
        max-width: 400px;
    }
}

.main-logo {
    max-width: 600px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(128, 0, 128, 0.7));
}