/**
 * Empty State Design - No Posts Found
 * Fun animations for archive pages without content
 */

/* メインコンテナ */
.forth-no-posts-universe {
    min-height: 500px;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f2ff 50%, #f0f4f8 100%);
    border-radius: 20px;
    overflow: hidden;
    margin: 40px 0;
}

/* 望遠鏡アニメーション */
.telescope-animation {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    opacity: 0.3;
}

.telescope {
    font-size: 80px;
    animation: telescope-scan 8s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes telescope-scan {
    0%, 100% { transform: rotate(-15deg); }
    25% { transform: rotate(0deg) scale(1.1); }
    50% { transform: rotate(15deg); }
    75% { transform: rotate(0deg) scale(0.95); }
}

/* 星のアニメーション */
.stars-searching {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.star {
    position: absolute;
    font-size: 24px;
    animation: star-twinkle 3s ease-in-out infinite;
}

.star-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 60%;
    right: 20%;
    animation-delay: 0.5s;
    font-size: 30px;
}

.star-3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 1s;
}

.star-4 {
    top: 40%;
    right: 40%;
    animation-delay: 1.5s;
    font-size: 20px;
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* コンテンツエリア */
.forth-no-posts-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
}

/* タイトル */
.empty-title {
    font-size: 36px;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: bold;
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* メッセージ */
.empty-message {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ローディングアニメーション */
.loading-animation {
    margin: 40px auto;
    max-width: 400px;
}

.loading-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    position: relative;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #764ba2 75%,
        #667eea 100%);
    background-size: 200% 100%;
    width: 60%;
    border-radius: 13px;
    animation: loading-slide 3s linear infinite, loading-gradient 2s linear infinite;
}

@keyframes loading-slide {
    0% { width: 30%; }
    50% { width: 80%; }
    100% { width: 30%; }
}

@keyframes loading-gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.loading-text {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    animation: loading-blink 1s steps(2) infinite;
}

@keyframes loading-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* ヒントボックス */
.empty-hint {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 10px;
    margin: 30px auto;
    max-width: 500px;
    font-size: 16px;
    color: #78350f;
    box-shadow: 0 4px 6px rgba(251, 191, 36, 0.1);
    animation: hint-bounce 4s ease-in-out infinite;
}

@keyframes hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 他セクションへのポータル */
.explore-other-sections {
    margin-top: 60px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.explore-other-sections h3 {
    font-size: 24px;
    color: #334155;
    margin-bottom: 30px;
}

.section-portals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.section-portal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: white;
    border-radius: 15px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.section-portal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.section-portal:hover::before {
    animation: portal-shine 0.5s ease-out;
    opacity: 1;
}

@keyframes portal-shine {
    from { transform: rotate(45deg) translateX(-100%); }
    to { transform: rotate(45deg) translateX(100%); }
}

.theory-portal:hover {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

.calc-portal:hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2);
}

.sim-portal:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.obs-portal:hover {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.portal-emoji {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
    animation: emoji-float 3s ease-in-out infinite;
}

@keyframes emoji-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.1); }
}

.section-portal span:not(.portal-emoji) {
    font-size: 16px;
    font-weight: 600;
}

/* 検索セクション */
.search-alternative {
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
}

.search-alternative h3 {
    font-size: 20px;
    color: #334155;
    margin-bottom: 20px;
}

.search-alternative .search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.search-alternative input[type="search"] {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-alternative input[type="search"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-alternative button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.search-alternative button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .telescope-animation {
        width: 100px;
        height: 100px;
        opacity: 0.2;
    }

    .telescope {
        font-size: 40px;
    }

    .empty-title {
        font-size: 28px;
    }

    .empty-message {
        font-size: 16px;
    }

    .section-portals {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .section-portal {
        padding: 20px;
    }

    .portal-emoji {
        font-size: 32px;
    }

    .search-alternative .search-form {
        flex-direction: column;
    }

    .search-alternative input[type="search"],
    .search-alternative button {
        width: 100%;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .forth-no-posts-universe {
        background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    }

    .empty-title {
        color: #f1f5f9;
    }

    .empty-message {
        color: #cbd5e1;
    }

    .empty-hint {
        background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
        color: #fef3c7;
        border-left-color: #fbbf24;
    }

    .explore-other-sections,
    .search-alternative {
        background: rgba(30, 41, 59, 0.9);
    }

    .explore-other-sections h3,
    .search-alternative h3 {
        color: #f1f5f9;
    }

    .section-portal {
        background: #334155;
        color: #f1f5f9;
    }

    .loading-bar {
        background: rgba(51, 65, 85, 0.5);
        border-color: #475569;
    }
}

/* アニメーション軽減対応 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}