@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;
    overflow: hidden;
}

/* --- 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;
}

/* Top white gradient for logo and header visibility */
.view-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 60px, rgba(255,255,255,0.9) 150px, rgba(255,255,255,0) 100%);
    z-index: 50; /* Above image (-1), below UI elements (100) */
    pointer-events: none;
    opacity: 0;
    animation: fadeInSiteLogo 3.5s ease-out forwards 0.5s;
}

#image-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.05);
    filter: saturate(0) blur(4px);
    transition: opacity 2s ease, filter 2s ease, transform 30s linear;
    border: none;
    z-index: -1;
}

#image-display.show {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) blur(0);
    transition: opacity 3s ease-out, filter 3s ease-out, transform 15s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Center Wrapper */
#center-content-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    z-index: 100;
    width: 90vw;
    pointer-events: none; /* Let clicks pass through empty areas */
}

#center-content-wrapper > * {
    pointer-events: auto; /* Re-enable clicks for items */
}

/* Horizontal Text for Caption */
#caption-display {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #ffffff;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 4px 15px rgba(0,0,0,0.6);
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

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

/* Horizontal Catchphrase (Center Overlay) */
#catchphrase-display {
    font-family: var(--font-japanese);
    font-size: 3rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 4px 15px rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 2s ease-in-out;
    letter-spacing: 0.15em;
    text-align: center;
    white-space: normal;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
}

#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 {
    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);
    margin-top: 20px;
}

#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;
}

/* --- Logo Area --- */
#logo-wrapper {
    position: absolute;
    top: 55px;
    left: 55px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
}
#logo-column {
    position: relative;
    display: flex;
    flex-direction: column;
}

#logo-fullname-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 2px;
}

#logo-fullname {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    animation: fadeInSiteLogo 3.5s ease-out forwards 1.2s;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#logo-fullname:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 15px rgba(184,134,11,0.4));
}

#site-logo {
    height: 90px;
    width: auto;
    opacity: 0;
    animation: fadeInSiteLogo 3.5s ease-out forwards 1.2s;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: default;
}

#site-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 15px rgba(184,134,11,0.4));
}

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

/* --- Logo Subtext --- */
#logo-subtext-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInSiteLogo 3.5s ease-out forwards 1.4s;
}

/* --- Header Band --- */
#header-band {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333333;
    z-index: 90;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Partners Display --- */
#partners-display {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    opacity: 0;
    animation: fadeInSiteLogo 3s ease-out forwards 1.8s;
    color: #ffffff;
}

#partners-display .partner-item {
    display: flex;
    align-items: center;
    background: transparent; /* No button background */
    padding: 2px 0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 0.05em;
}

#partners-display .partner-item:hover {
    color: #ce6e0a;
}

/* --- 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;
}

/* --- Coffee Badge --- */
#coffee-badge {
    position: absolute;
    top: 55px;
    right: 45px;
    z-index: 100;
    opacity: 0;
    animation: fadeInSiteLogo 3.5s ease-out forwards 1.4s;
    transition: all 0.3s ease;
    text-decoration: none;
    
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background-color: #fff;
    border: 4px solid #ce6e0a; /* Solid outer orange border */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: rotate(15deg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

#coffee-badge::before {
    content: '';
    position: absolute;
    top: 3px; left: 3px; right: 3px; bottom: 3px;
    border-radius: 50%;
    border: 2px dashed #d0d0d0; /* Base gray dashes */
    border-top-color: #ce6e0a; /* Accent orange dashes */
    border-right-color: #f39c12; /* Lighter orange sweeps */
    pointer-events: none;
    animation: rotateDashedBorder 15s linear infinite; /* Beautifully visible colored rotation */
}

#coffee-badge:hover {
    transform: rotate(0deg) scale(1.08); /* Changed to 0deg to pop up straight */
    box-shadow: 0 8px 25px rgba(217, 101, 0, 0.2);
}

#coffee-badge .badge-text-small {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0em;
    line-height: 1.2;
    color: #222;
    z-index: 1;
}

#coffee-badge .badge-text-large {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ce6e0a;
    line-height: 1.1;
    margin: 2px 0;
    font-family: 'Helvetica Neue', Helvetica, 'Arial Black', sans-serif;
    z-index: 1;
}

@keyframes rotateDashedBorder {
    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;
}

.bottom-link-btn.youtube-music-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4);
    color: #fff;
}

.bottom-link-btn.youtube-music-btn:hover {
    box-shadow: 0 8px 25px rgba(204, 0, 0, 0.6);
    color: #fff;
}

#business-hours-display {
    position: absolute;
    bottom: 190px; /* Shifted up to clear vertical bottom links */
    left: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #ffffff;
    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 2px 8px rgba(0,0,0,0.8);
}

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

/* --- Date Display --- */
#date-display {
    font-family: var(--font-japanese);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #ffffff;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    margin-top: 15px; /* Add breathing room above date */
}

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

@keyframes fadeInLogo {
    to { opacity: 0.95; }
}
/* --- Mobile Device Optimizations --- */
@media (max-width: 768px) {
    #center-content-wrapper {
        gap: 30px;
        width: 95vw;
    }
    
    /* Main Display */
    #logo-wrapper {
        top: 50px;
        left: 20px;
    }

    #site-logo {
        height: 55px;
    }

    #logo-subtext-display {
        font-size: 0.9rem;
    }

    #partners-display {
        gap: 6px;
    }

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

    #coffee-badge {
        top: 50px;
        right: 15px;
        width: 100px;
        height: 100px;
        border-width: 3px;
    }

    #coffee-badge::before {
        top: 2px; left: 2px; right: 2px; bottom: 2px;
        border-width: 1.5px;
    }

    #coffee-badge .badge-text-small {
        font-size: 0.65rem;
    }

    #coffee-badge .badge-text-large {
        font-size: 1.2rem;
    }

    #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: 175px; /* 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 {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
        margin-top: 5px;
    }

    #caption-display {
        font-size: 1.1rem;
        letter-spacing: 0.1em;
        line-height: 1.6;
        padding-left: 0;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 4px 15px rgba(0,0,0,0.6);
    }

    #catchphrase-display {
        font-size: 1.8rem;
    }

    #insta-display {
        font-size: 0.8rem;
        padding: 10px 20px;
        margin-top: 10px;
    }

    #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;
    }
}

/* --- Landscape / Small Height Optimizations --- */
@media (max-height: 500px) and (orientation: landscape) {
    #logo-wrapper {
        top: 45px;
        left: 15px;
    }
    #site-logo {
        height: 35px;
    }
    #logo-subtext-display {
        font-size: 0.8rem;
    }
    #center-content-wrapper {
        gap: 15px;
    }
    #caption-display {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    #catchphrase-display {
        font-size: 1.2rem;
    }
    #insta-display {
        padding: 5px 12px;
        font-size: 0.75rem;
        margin-top: 5px;
    }
    #coffee-badge {
        top: 45px;
        right: 15px;
        width: 70px;
        height: 70px;
        border-width: 2px;
    }
    #coffee-badge::before {
        border-width: 1px;
    }
    #coffee-badge .badge-text-large {
        font-size: 0.9rem;
        margin: 0;
    }
    #coffee-badge .badge-text-small {
        font-size: 0.55rem;
    }
    #bottom-links {
        bottom: 15px;
        left: 15px;
        gap: 8px;
        flex-direction: row;
    }
    .bottom-link-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    #business-hours-display {
        bottom: 55px;
        left: 15px;
        font-size: 0.6rem;
    }
    #bgm-toggle-btn {
        bottom: 15px;
        right: 15px;
        padding: 4px 10px;
        font-size: 0.65rem;
    }
    #footer-copyright-display {
        display: none !important;
    }
    #date-display {
        font-size: 0.7rem;
        margin-top: 5px;
    }
}
