/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: repeating-linear-gradient(
        45deg,
        #000000,
        #000000 100px,
        #FFD700 100px,
        #FFD700 200px
    );
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px 0;
    margin-bottom: 40px;
}

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

.site-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.site-title .fa-tiktok {
    color: #fe2c55;
    font-size: 3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.site-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* ========================================
   Main Content
   ======================================== */
.main {
    padding: 40px 0 80px;
}

/* Introduction Section */
.intro-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

/* ========================================
   TikTok Gallery Grid
   ======================================== */
.gallery-section {
    margin-bottom: 50px;
}

.tiktok-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.tiktok-item {
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.tiktok-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* TikTok Embed Styling */
.tiktok-embed {
    margin: 0 auto;
}

/* ========================================
   Call to Action Section
   ======================================== */
.cta-section {
    margin-bottom: 50px;
}

.cta-box {
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(254, 44, 85, 0.3);
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.cta-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #fe2c55;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cta-button .fa-tiktok {
    font-size: 1.5rem;
}

/* ========================================
   Admin Section
   ======================================== */
.admin-section {
    margin-bottom: 50px;
}

.admin-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: flex;
}

.admin-toggle:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.admin-panel {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.admin-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-panel h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.admin-info {
    color: #666;
    margin-bottom: 20px;
}

.admin-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.admin-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.admin-input:focus {
    outline: none;
    border-color: #667eea;
}

.admin-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-button:hover {
    background: #5568d3;
}

.admin-list h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.storage-badge {
    font-size: 0.9rem;
    color: #4CAF50;
    font-weight: 600;
    background: rgba(76, 175, 80, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.video-list {
    list-style: none;
}

.video-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.video-list li span {
    color: #666;
    font-size: 0.9rem;
    word-break: break-all;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: #ff5252;
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ff9800;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.reset-btn:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 0;
    margin-top: 50px;
}

.footer-text {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.footer-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: #5568d3;
}

/* ========================================
   Responsive Design
   ======================================== */

/* タブレット（中サイズ画面）- 2列表示 */
@media (max-width: 1200px) {
    .tiktok-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* タブレット・スマホ（小サイズ画面）- 1列表示 */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }

    .site-title .fa-tiktok {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .intro-section {
        padding: 30px 20px;
    }

    .tiktok-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cta-box {
        padding: 40px 20px;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .admin-form {
        flex-direction: column;
    }

    .admin-panel {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 12px 30px;
    }
}

/* ========================================
   Mobile TikTok Card (サムネイル + ボタン方式)
   ======================================== */
.mobile-tiktok-card {
    display: none; /* デフォルトは非表示（PCでは埋め込み表示） */
}

@media (max-width: 768px) {
    /* スマホでは埋め込みを非表示 */
    .tiktok-embed {
        display: none !important;
    }
    
    /* スマホではモバイルカードを表示 */
    .mobile-tiktok-card {
        display: block;
        text-align: center;
        padding: 20px;
    }
    
    .mobile-tiktok-thumbnail {
        width: 100%;
        max-width: 300px;
        height: 400px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 15px;
        margin: 0 auto 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-tiktok-thumbnail::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 1;
    }
    
    .thumbnail-loading {
        position: relative;
        z-index: 2;
    }
    
    .thumbnail-loading i,
    .mobile-tiktok-thumbnail i {
        font-size: 5rem;
        color: white;
        position: relative;
        z-index: 2;
    }
    
    .mobile-tiktok-button {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        background: #fe2c55;
        color: white;
        font-size: 1.1rem;
        font-weight: 700;
        padding: 15px 30px;
        border-radius: 50px;
        text-decoration: none;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 5px 20px rgba(254, 44, 85, 0.3);
    }
    
    .mobile-tiktok-button:active {
        transform: scale(0.95);
    }
    
    .mobile-tiktok-button i {
        font-size: 1.5rem;
    }
}