:root {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #FF1493;
    --accent-color-dark: #ff0080;
    --border-color: #3d3d3d;
    --code-background: #2d2d2d;
    --bg-color: #ffffff;
    --button-bg: #ff1493;
    --button-hover: #ff69b4;
    --button-text: #ffffff;
    --card-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a1a1a;
        --text-color: #ffffff;
        --accent-color: #FF1493;
        --accent-color-dark: #ff0080;
        --border-color: #404040;
        --code-background: #2d2d2d;
        --bg-color: #1a1a1a;
        --button-bg: #ff1493;
        --button-hover: #ff69b4;
        --button-text: #ffffff;
        --card-bg: #2d2d2d;
    }
}

body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ヘッダーセクション */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.header p {
    font-size: 1.2em;
    color: #888;
}

/* エンドポイントセクション */
.endpoint {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
}

.endpoint-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.endpoint-method {
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-right: 10px;
}

.endpoint-path {
    font-family: monospace;
    font-size: 1.2em;
}

/* レスポンス情報 */
.response-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--code-background);
    border-radius: 5px;
}

.response-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.response-status.success { background: #4CAF50; }
.response-status.error { background: #f44336; }
.response-status.redirect { background: #FF9800; }

.response-time {
    padding: 5px 10px;
    border-radius: 4px;
    color: #888;
    font-size: 0.9em;
}

/* タブ */
.response-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tab-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.tab-content {
    display: none;
    padding: 20px;
    background: var(--code-background);
    border-radius: 5px;
}

.tab-content.active {
    display: block;
}

/* ボタン */
.dick-button {
    background: linear-gradient(to bottom, var(--accent-color), var(--accent-color-dark));
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.dick-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
}

.dick-button:active {
    transform: scale(0.95);
}

/* アニメーション */
@keyframes button-shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px) rotate(-1deg); }
    20% { transform: translateX(2px) rotate(1deg); }
    30% { transform: translateX(-2px) rotate(-1deg); }
    40% { transform: translateX(2px) rotate(1deg); }
    50% { transform: translateX(-2px) rotate(-1deg); }
    60% { transform: translateX(2px) rotate(1deg); }
    70% { transform: translateX(-2px) rotate(-1deg); }
    80% { transform: translateX(2px) rotate(1deg); }
    90% { transform: translateX(-2px) rotate(-1deg); }
}

.button-pressed {
    animation: button-shake 0.5s ease-in-out;
}

/* エフェクト */
.dick-animation {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 2em;
    font-weight: bold;
    transform-origin: center center;
}

.confetti {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 15px;
    height: 15px;
    border-radius: 2px;
    transform-origin: center center;
}

.confetti.circle {
    border-radius: 50%;
    width: 8px;
    height: 8px;
}

.confetti.rectangle {
    width: 20px;
    height: 8px;
}

@keyframes pop-and-spin {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        transform: scale(0.5) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(2) rotate(720deg);
        opacity: 0;
    }
}

@keyframes expand-and-fade {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        transform: translate(calc(var(--tx) * 0.1), calc(var(--ty) * 0.1)) scale(0.5) rotate(45deg);
        opacity: 1;
    }
    60% {
        transform: translate(calc(var(--tx) * 1.2), calc(var(--ty) * 1.2)) scale(1.5) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: translate(calc(var(--tx) * 2), calc(var(--ty) * 2)) scale(0) rotate(720deg);
        opacity: 0;
    }
}

/* キャプチャ画面 */
.captcha-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2rem;
}

.captcha-container h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
}

/* ローディング */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-color);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--accent-color);
    font-weight: bold;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* エラーメッセージ */
.error-message {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 5px;
}

.error-icon {
    font-size: 2em;
}

.error-title {
    color: #f44336;
    font-weight: bold;
    margin-bottom: 5px;
}

.error-details {
    color: #888;
}

/* Stats表示 */
.stats-preview {
    padding: 20px;
    background: var(--code-background);
    border-radius: 8px;
    color: var(--text-color);
}

.stat-item {
    margin-bottom: 20px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 1.1em;
    color: #888;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.stat-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.category-name {
    color: var(--text-color);
}

.category-count {
    color: var(--accent-color);
    font-weight: bold;
}

/* 言語切り替え */
.lang-switch {
    position: fixed;
    top: 20px;
    right: 100px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.lang-switch button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.lang-switch button:hover {
    background: var(--accent-color-dark);
    transform: scale(1.05);
}

.lang-switch button:active {
    transform: scale(0.95);
}

.lang-switch button.active {
    background: var(--accent-color-dark);
}

/* コンテンツの表示制御 */
.content[data-lang] {
    display: none;
}

.content[data-lang].active {
    display: block;
}

/* テーマ遷移のアニメーション */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* テーマトグルボタン */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .icon {
    font-size: 24px;
    color: white;
    transition: transform 0.5s ease;
}

.theme-toggle[data-theme="dark"] .icon {
    transform: rotate(360deg) scale(0.8);
}

/* テーマ切り替え時のページ全体のアニメーション */
.theme-transition {
    animation: themeChange 0.5s ease;
}

@keyframes themeChange {
    0% {
        filter: blur(0);
        transform: scale(1);
    }
    50% {
        filter: blur(2px);
        transform: scale(0.98);
    }
    100% {
        filter: blur(0);
        transform: scale(1);
    }
}
