/* public_html/style.css */
:root {
    --summer-primary: #ff7e5f; /* Coral */
    --summer-secondary: #feb47b; /* Peach */
    --summer-accent: #00a896; /* Turquoise */
    --summer-light: #e0f7fa; /* Light Cyan */
    --summer-dark: #004d40; /* Dark Teal */
    --summer-text: #004d40;
    --summer-background: #f0f9ff;
    --summer-card: rgba(255, 255, 255, 0.4);
    --summer-shadow: rgba(0, 77, 64, 0.15);
    --font-main: 'Poppins', sans-serif;
    --font-display: 'Pacifico', cursive;
    --summer-warning: #fdcb6e;
    --summer-download: #00b894;
}

@media (prefers-color-scheme: dark) {
    :root {
        --summer-primary: #ff8a65; /* Lighter Coral */
        --summer-secondary: #ffb74d; /* Lighter Peach */
        --summer-accent: #4db6ac; /* Lighter Turquoise */
        --summer-light: #263238; /* Dark Blue Grey */
        --summer-dark: #eceff1; /* Light Grey */
        --summer-text: #e0f2f1; /* Light Teal */
        --summer-background: #001f24; /* Very Dark Teal */
        --summer-card: rgba(0, 77, 64, 0.25);
        --summer-shadow: rgba(0, 200, 170, 0.15);
        --summer-warning: #ffeaa7;
        --summer-download: #00d1a1;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--summer-background);
    color: var(--summer-text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 1% 1%, var(--summer-light), transparent 40%),
        radial-gradient(circle at 99% 99%, var(--summer-secondary), transparent 40%);
    transition: background-color 0.5s ease, color 0.5s ease;
}

.summer-theme {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 1.5s 0.2s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- Header --- */
header {
    text-align: center;
    padding: 5rem 0;
    position: relative;
}

header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--summer-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--summer-primary), 0 0 20px var(--summer-primary), 0 0 40px rgba(255, 126, 95, 0.5);
    animation: flicker 4s infinite alternate, fadeInDown 1s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 0 0 8px var(--summer-primary), 0 0 15px var(--summer-primary), 0 0 30px rgba(255, 126, 95, 0.5);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.summer-icon {
    font-size: 0.8em;
    animation: spin 5s linear infinite;
    color: var(--summer-accent);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

header p {
    font-size: 1.2rem;
    color: var(--summer-dark);
    max-width: 650px;
    margin: 0 auto;
    animation: fadeInUp 1s 0.3s ease-out backwards;
}

/* --- Navigation --- */
.nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 4rem;
    flex-wrap: wrap;
}

.nav a {
    color: var(--summer-primary);
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: transparent;
    border: 2px solid var(--summer-primary);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    animation: fadeInUp 0.8s ease-out backwards;
}

.nav .nav-text {
    position: relative;
    z-index: 2;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--summer-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.nav a:hover {
    color: var(--summer-background);
    box-shadow: 0 10px 25px var(--summer-shadow);
    transform: translateY(-3px);
}

.nav a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* --- Cards --- */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.card {
    background: var(--summer-card);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    box-shadow: 0 8px 32px 0 var(--summer-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    animation: cardAppear 1s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2), transparent 40%);
    transform: rotate(0deg);
    transition: transform 1s ease, opacity 0.5s ease;
    opacity: 0;
}

.card:hover::before {
    transform: rotate(180deg);
    opacity: 1;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 16px 40px 0 var(--summer-shadow);
}

.card h2 {
    color: var(--summer-primary);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.card-icon {
    color: var(--summer-accent);
}

.card p, .card ol {
    font-size: 1rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.card ol {
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.card li {
    margin-bottom: 0.5rem;
}

/* For creators.html & vtuber.html */
.creator-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 5px 15px var(--summer-shadow);
    border: 3px solid var(--summer-light);
}

.card:hover .creator-img {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 10px 25px var(--summer-shadow);
}

.card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* For software.html */
.download-card {
    background: var(--summer-card);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 650px;
    margin: 3rem auto;
    box-shadow: 0 10px 30px var(--summer-shadow);
    animation: cardAppear 1s ease-out;
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.android-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    fill: var(--summer-download);
}
.version-badge {
    display: inline-block;
    background: var(--summer-download);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}
.download-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--summer-download), var(--summer-primary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 126, 95, 0.4);
    font-weight: 600;
    letter-spacing: 1px;
}
.download-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 126, 95, 0.6);
}
.download-info {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.1);
    backdrop-filter: blur(5px);
}
.download-info p {
    margin: 0.5rem 0;
    color: var(--summer-text);
}
.install-steps {
    margin: 2rem 0;
    text-align: left;
}
.install-steps h3 {
    color: var(--summer-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.install-steps ol {
    padding-left: 1.2rem;
}
.install-steps li {
    margin: 0.5rem 0;
    color: var(--summer-text);
}
.security-notice {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(253, 203, 110, 0.1);
    border: 1px solid var(--summer-warning);
}
.security-notice h3 {
    color: var(--summer-warning);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Background Effects --- */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    color: var(--summer-accent);
}

@keyframes particleFloat {
    from {
        transform: translateY(105vh) translateX(var(--x-start)) rotate(0deg);
    }
    to {
        transform: translateY(-5vh) translateX(var(--x-end)) rotate(720deg);
    }
}

.waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 0;
    pointer-events: none;
}

.wave {
    position: absolute;
    width: 200%;
    height: 250px;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 88.7'%3e%3cpath d='M800 56.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v31.8h800v-.2-31.6z' fill='%2300a896'/%3e%3c/svg%3e")
        repeat-x;
    background-size: 800px 250px;
    animation: waveAnimation 15s linear infinite;
    opacity: 0.1;
}

.wave.wave2 {
    animation-duration: 20s;
    animation-direction: reverse;
    opacity: 0.2;
}

.wave.wave3 {
    animation-duration: 25s;
    opacity: 0.3;
}

@keyframes waveAnimation {
    from { transform: translateX(0); }
    to { transform: translateX(-800px); }
}

.water-drop {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--summer-accent), transparent);
    animation: dropAnimation 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

@keyframes dropAnimation {
    0%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.1;
    }
    75% {
        transform: scale(1.2);
        opacity: 0.05;
    }
}

/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    header {
        padding: 4rem 0;
    }
    .nav {
        gap: 0.75rem;
    }
    .nav a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .card-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .card, .download-card {
        padding: 2rem;
    }
    .card h2 {
        font-size: 1.4rem;
    }
}

/* --- Creator Detail Page --- */
.creator-detail-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    align-items: start;
    background: var(--summer-card);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 var(--summer-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    animation: cardAppear 1s ease-out backwards;
    overflow: visible;
    margin-top: 4rem;
}

.creator-detail-card .creator-img-wrapper {
    position: relative;
    margin-top: -4rem; /* カードから少しはみ出させる */
    aspect-ratio: 1 / 1;
}

.creator-detail-card .creator-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 25px var(--summer-shadow);
    border: 4px solid var(--summer-light);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.creator-detail-card:hover .creator-img {
    transform: scale(1.08) rotate(-3deg);
}

.creator-detail-card .creator-info h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--summer-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 5px var(--summer-shadow);
}

.creator-detail-card .creator-info .description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-style: italic;
    color: var(--summer-dark);
    border-left: 3px solid var(--summer-accent);
    padding-left: 1rem;
}

.creator-detail-card .creator-info h3 {
    font-size: 1.4rem;
    color: var(--summer-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--summer-accent);
    display: inline-block;
}

.creator-detail-card .creator-info ul {
    list-style: none;
    padding: 0;
}

.creator-detail-card .creator-info li {
    padding: 0.75rem;
    border-bottom: 1px dashed rgba(0, 77, 64, 0.2);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

.creator-detail-card .creator-info li:hover {
    background-color: rgba(0, 168, 150, 0.05);
}

.creator-detail-card .creator-info li::before {
    content: '🐚';
    color: var(--summer-accent);
    font-size: 1.2rem;
    line-height: 1.7;
    flex-shrink: 0;
}

.creator-detail-card .creator-info li:last-child {
    border-bottom: none;
}

.creator-detail-card .creator-info li strong {
    color: var(--summer-primary);
    min-width: 100px;
    flex-shrink: 0;
}

/* Responsive for detail card */
@media (max-width: 850px) {
    .creator-detail-card {
        grid-template-columns: 1fr;
        padding: 2rem;
        margin-top: 2rem;
    }
    .creator-detail-card .creator-img-wrapper {
        margin-top: 0;
        margin-bottom: 1rem;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .creator-detail-card .creator-info {
        text-align: center;
    }
    .creator-detail-card .creator-info .description {
        border-left: none;
        padding-left: 0;
    }
    .creator-detail-card .creator-info h3 {
        margin-left: auto;
        margin-right: auto;
    }
    .creator-detail-card .creator-info ul {
        text-align: left;
    }
}