/* グラフィックレコーディング風カスタムスタイル */

/* 手書き風の線や枠線 */
.border-dashed {
    border-style: dashed;
    border-width: 2px;
}

/* カード装飾 */
.video-card {
    transition: all 0.3s ease;
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: transparent;
    border-radius: 10px;
    z-index: -1;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-card:hover::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
}

/* 手書き風のアンダーライン */
h1, h2, h3 {
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
}

/* 数値表示のスタイル */
.view-count, .subscriber-count {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 500;
}

/* ローディングアニメーション */
@keyframes handdrawn-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(85deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(275deg); }
    100% { transform: rotate(360deg); }
}

#loading .animate-spin {
    animation: handdrawn-spin 1.5s linear infinite;
    border-radius: 50%;
    border-top-color: #3b82f6;
    border-bottom-color: #8b5cf6;
    border-left-color: transparent;
    border-right-color: transparent;
}

/* ボタンスタイル */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

button:hover::after {
    transform: translateY(0);
}

/* 検索結果がない場合のメッセージ */
.no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 2px dashed #d1d5db;
    margin: 2rem 0;
}

/* CSVエクスポートボタンのホバーエフェクト */
#export-csv:hover {
    background-color: #7c3aed;
    box-shadow: 0 4px 6px rgba(124, 58, 237, 0.3);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h1::after {
        width: 80px;
    }
    
    .video-card .title {
        font-size: 1rem;
    }
}

/* ツールチップスタイル */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* エラーメッセージのアニメーション */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#error-message.shake {
    animation: shake 0.6s;
}
