/**
 * Tempest AI - カスタムCSS
 */

/* ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #172554 100%);
    min-height: 100vh;
    color: #ffffff;
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* グラデーションテキスト */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* カードスタイル */
.card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.card-hover:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* ボタンスタイル */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-line {
    background: #06c755;
    color: white;
}

.btn-line:hover {
    background: #05b34a;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 入力フィールド */
.input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input::placeholder {
    color: #64748b;
}

/* セレクトボックス */
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* トグルスイッチ */
.toggle {
    width: 48px;
    height: 24px;
    background: rgba(100, 116, 139, 0.5);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.toggle.active {
    background: #3b82f6;
}

.toggle.active::after {
    left: 26px;
}

/* タブ */
.tab {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #94a3b8;
}

.tab:hover {
    background: rgba(148, 163, 184, 0.1);
}

.tab.active {
    background: white;
    color: #1e293b;
}

/* バッジ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* プログレスバー */
.progress {
    height: 4px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-bar-blue {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
}

.progress-bar-green {
    background: linear-gradient(to right, #22c55e, #4ade80);
}

/* テーブル */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: rgba(15, 23, 42, 0.5);
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.table tr:hover td {
    background: rgba(148, 163, 184, 0.05);
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.toast-title {
    color: white;
    font-weight: 600;
}

.toast-message {
    color: #94a3b8;
    font-size: 14px;
}

/* ナビゲーション */
.nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-link {
    padding: 8px 12px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white;
    background: rgba(148, 163, 184, 0.1);
}

.nav-link.active {
    color: white;
}

/* レースカード */
.race-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.race-card:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
    transform: translateX(4px);
}

.race-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 8px;
    font-weight: 600;
}

/* Xポスト風 */
.x-post {
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.x-post:last-child {
    border-bottom: none;
}

.x-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* ファイルドロップエリア */
.drop-zone {
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* プランカード */
.plan-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
}

.plan-card.recommended {
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}
