@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

:root {
    --bg-color: #FAFAFA;
    --text-color: #1a1a1a;
    --accent-color: #b8860b; /* Darker Gold for visibility on white */
    --accent-hover: #8b6508;
    --border-color: #e0e0e0;
    --font-japanese: 'Inter', 'Helvetica Neue', Helvetica, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-japanese);
    line-height: 1.6;
}

body.view-body {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* --- Index (View) Page Styles --- */
.view-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background subtly animated pattern / gradient */
.view-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, #ffffff 0%, #f0f0f0 100%);
    z-index: -2;
}

#image-display {
    width: 75vmin;
    height: 75vmin;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* Subtle baseline shadow */
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    filter: saturate(0) blur(4px);
    transition: opacity 2s ease, filter 2s ease, box-shadow 2s ease, transform 30s linear;
    border: none;
    border-radius: 4px; /* Optional slight rounding for modern elegance */
}

#image-display.show {
    opacity: 1;
    transform: translateY(0px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.04); /* Premium depth on white */
    filter: saturate(1) blur(0);
    transition: opacity 3s ease-out, filter 3s ease-out, box-shadow 3s ease-out, transform 15s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Vertical Text for Caption */
#caption-display {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--text-color);
    opacity: 0;
    transition: opacity 2s ease-in-out, right 2s ease-out;
    text-shadow: 2px 2px 10px rgba(255,255,255,0.8);
    border-left: 1px solid var(--accent-color);
    padding-left: 20px;
    height: 70vh;
}

#caption-display.show {
    opacity: 1;
    right: 8%;
}

/* Horizontal Catchphrase (Center Overlay) */
#catchphrase-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-japanese);
    font-size: 3rem;
    color: var(--text-color);
    text-shadow: 2px 2px 10px rgba(255,255,255,0.8);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    letter-spacing: 0.15em;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
    font-weight: 700;
}

#catchphrase-display.show {
    opacity: 1;
}

.no-data {
    font-size: 1.2rem;
    color: #666;
    letter-spacing: 0.1em;
}

/* Admin Link slightly visible */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
    font-family: sans-serif;
}
.admin-link:hover {
    color: var(--accent-color);
}

/* --- Admin Page Styles --- */
.admin-body {
    background-color: #f5f5f5;
    padding: 40px 20px;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 2rem;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    font-weight: 400;
}

.admin-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

.form-group input[type="file"],
.form-group input[type="text"],
.form-group input[type="url"] {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: #1a1a1a;
    font-family: inherit;
    border-radius: 4px;
}

.form-group input[type="file"] {
    padding: 8px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: #000;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-danger {
    background: #8b0000;
    color: #fff;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: normal;
}
.btn-danger:hover {
    background: #660000;
}

.message {
    margin-top: 15px;
    padding: 10px;
    display: none;
    border-radius: 4px;
}
.message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
    display: block;
}
.message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    display: block;
}

/* List of uploaded items */
.item-list {
    margin-top: 50px;
}

.item-list h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-weight: 300;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.list-item {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.list-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.list-item p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

#insta-display {
    position: absolute;
    bottom: 80px;
    right: 20px; /* Aligned with BGM toggle */
    z-index: 100;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: 1px solid var(--accent-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-family: var(--font-japanese);
    letter-spacing: 0.1em;
    opacity: 0;
    transition: all 0.4s ease, opacity 2s ease-in-out;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#insta-display svg {
    width: 20px;
    height: 20px;
}

#insta-display:hover {
    background: rgba(184, 134, 11, 0.1);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.2);
    color: var(--accent-hover);
    border-color: var(--accent-hover);
}

#insta-display.show {
    opacity: 1;
}

/* --- Site Logo --- */
#site-logo {
    position: absolute;
    top: 45px;
    left: 55px;
    font-family: Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #0a4a8b;
    line-height: 1;
    z-index: 100;
    opacity: 0;
    transform: scale(1, 1.3);
    transform-origin: left center;
    animation: fadeInSiteLogo 3.5s ease-out forwards 1.2s;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: default;
    text-transform: uppercase;
}

#site-logo:hover {
    transform: scale(1.02, 1.33);
    color: #06315c;
    text-shadow: 0 0 15px rgba(10, 74, 139, 0.4);
}

@keyframes fadeInSiteLogo {
    to { opacity: 0.9; }
}

/* --- Partners Display --- */
#partners-display {
    position: absolute;
    top: 108px;
    left: 55px;
    z-index: 100;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    opacity: 0;
    animation: fadeInSiteLogo 3s ease-out forwards 1.8s;
}

#partners-display .partner-item {
    display: flex;
    align-items: center;
    background: transparent; /* No button background */
    padding: 2px 0;
    transition: color 0.3s ease;
    text-decoration: none;
    color: rgba(0,0,0,0.4); /* Same color as PARTNERS label */
}

#partners-display .partner-item:hover {
    color: rgba(0,0,0,0.7); /* Subtle darkening on hover instead of popping out */
}

/* --- BGM Toggle --- */
#bgm-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    color: #666;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: none; /* Shown dynamically via JS */
    font-family: var(--font-japanese), sans-serif;
    letter-spacing: 0.05em;
}

#bgm-toggle-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

#bgm-toggle-btn.playing {
    color: #ce6e0a; /* Signature TSCC Orange */
    border-color: #ce6e0a;
}

/* --- Image Badge --- */
#image-badge {
    position: absolute;
    top: 35px;
    right: 45px;
    z-index: 100;
    opacity: 0;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    animation: fadeInSiteLogo 3.5s ease-out forwards 1.4s;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    display: block;
}

#image-badge img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    animation: rotateBadge 15s linear infinite;
    transition: transform 0.3s ease;
}

#image-badge:hover img {
    transform: scale(1.05);
}

@keyframes rotateBadge {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Bottom Left Links --- */
#bottom-links {
    position: absolute;
    bottom: 40px;
    left: 50px;
    z-index: 100;
    opacity: 0;
    animation: fadeInLogo 3s ease-in-out forwards 1.5s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.bottom-link-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 24px;
    color: #fff;
    font-family: var(--font-japanese);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 2px; /* Crisp rectangular shape */
    border: 2px solid transparent; /* Enables outline for note without shifting */
    transition: all 0.3s cubic-bezier(0.25, 1.5, 0.5, 1);
}

.bottom-link-btn:hover {
    transform: translateY(-4px) scale(1.05);
}

.bottom-link-btn.note-btn {
    background: #fff;
    color: #111;
    border-color: #111;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Subtle shadow for white */
}

.bottom-link-btn.note-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    background: #fcfcfc;
    color: #111;
}

.bottom-link-btn.spotify-btn {
    background: linear-gradient(135deg, #1db954, #158a3a);
    box-shadow: 0 4px 15px rgba(21, 138, 58, 0.4); /* Deeper Spotify colored shadow */
    color: #fff;
}

.bottom-link-btn.spotify-btn:hover {
    box-shadow: 0 8px 25px rgba(21, 138, 58, 0.6);
    color: #fff;
}

#business-hours-display {
    position: absolute;
    bottom: 140px; /* Shifted up to clear vertical bottom links */
    left: 50px;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-color);
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
    font-family: 'Cinzel', 'Noto Serif JP', serif;
    z-index: 100;
    opacity: 0;
    animation: fadeInLogo 3s ease-in-out forwards 1.4s;
    transition: all 0.6s ease;
    border-left: 2px solid var(--accent-color);
    padding-left: 12px;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

/* --- Footer Copyright --- */
#footer-copyright-display {
    position: absolute;
    bottom: 15px;
    left: 50px;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.6;
    z-index: 100;
    pointer-events: none;
    letter-spacing: 0.05em;
    animation: fadeInLogo 3s ease-in-out forwards 1.7s;
    opacity: 0; /* Animated in */
}

/* --- Date Display --- */
#date-display {
    position: absolute;
    top: calc(50% + 37.5vmin + 30px);
    left: calc(50% - 37.5vmin);
    font-family: var(--font-japanese);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--text-color);
    z-index: 100;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

#date-display.show {
    opacity: 1;
}

@keyframes fadeInLogo {
    to { opacity: 0.95; }
}
/* --- Mobile Device Optimizations --- */
@media (max-width: 768px) {
    /* Main Display */
    #site-logo {
        top: 25px;
        left: 20px;
        font-size: 1.1rem;
        letter-spacing: 0.05em;
    }

    #partners-display {
        top: 68px;
        left: 20px;
        gap: 6px;
    }

    #bgm-toggle-btn {
        bottom: 15px;
        right: 15px;
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    #image-badge {
        top: 20px;
        right: 15px;
        width: 100px;
        height: 100px;
    }

    #bottom-links {
        bottom: 45px; /* Shifted up to clear footer text */
        left: 20px;
        gap: 10px;
    }

    .bottom-link-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    #business-hours-display {
        bottom: 145px; /* Shifted up to clear vertical bottom links */
        left: 20px;
        font-size: 0.65rem;
        padding-left: 10px;
        max-width: calc(100vw - 40px);
        line-height: 1.5;
    }

    #footer-copyright-display {
        bottom: 15px;
        left: 20px;
        font-size: 0.6rem;
        max-width: calc(100vw - 110px); /* Leave empty space for the BGM button on the right */
        word-wrap: break-word;
        line-height: 1.2;
    }

    #date-display {
        top: calc(50% + 42.5vw + 25px);
        left: calc(50% - 42.5vw);
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

    #image-display {
        width: 85vw;
        height: 85vw;
    }
    
    #caption-display {
        font-size: 1.1rem;
        letter-spacing: 0.15em;
        line-height: 2;
        right: 2%;
        height: 65vh;
        height: 65dvh;
        padding-left: 10px;
        text-shadow: 2px 2px 10px rgba(255,255,255,0.9);
    }

    #caption-display.show {
        right: 4%;
    }

    #catchphrase-display {
        font-size: 1.8rem;
        white-space: normal;
        width: 80vw;
    }

    #insta-display {
        bottom: 60px;
        right: 15px;
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    #insta-display svg {
        width: 16px;
        height: 16px;
    }

    /* Admin Panel */
    .admin-wrapper {
        padding: 20px 15px;
        margin: 10px;
    }

    .admin-header h1 {
        font-size: 1.6rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .list-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .list-item {
        padding: 10px;
    }
    
    .list-item img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    /* Smaller iPhones, etc */
    #caption-display {
        font-size: 1rem;
        letter-spacing: 0.1em;
        line-height: 1.8;
        padding-left: 8px;
    }
    
    .admin-header h1 {
        font-size: 1.3rem;
    }
    
    .list-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
}
