/* 全体のスタイル */
:root {
    --primary-gradient-start: #8A2BE2;
    --primary-gradient-end: #4C1D9E;
    --primary-color: #7f4adb;
    --primary-light: #9d69ff;
    --primary-dark: #4c1d9e;
    --secondary-color: #03dac6;
    --secondary-light: #5effeb;
    --secondary-dark: #00b3a6;
    --background-gradient-start: #0f0c29;
    --background-gradient-end: #070417;
    --background-color: #0e0626;
    --surface-color: rgba(26, 18, 64, 0.6);
    --card-color: rgba(36, 24, 83, 0.7);
    --accent-color: #03dac6;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --tier-s-color: #00e676;
    --tier-a-color: #03dac6;
    --tier-b-color: #ffab40;
    --tier-c-color: #cf6679;
    --shadow-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-elevation-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    --shadow-elevation-3: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    --glow-color: rgba(127, 74, 219, 0.5);
    --border-radius: 12px;
    --radius: 12px;
    --border-radius-sm: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--background-gradient-start), var(--background-gradient-end));
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* 言語選択ボタン */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    gap: 5px;
}

.lang-btn {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: bold;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevation-1);
}

.lang-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border-color: var(--primary-light);
    color: var(--background-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.lang-btn.active:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--primary-color));
}

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

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-gradient-start), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px var(--glow-color);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.glow-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.glow-link:hover {
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(0, 212, 255, 0.8),
        0 0 20px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.glow-link:active {
    transform: translateY(0);
}

#bottleneck-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--background-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#bottleneck-button:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 0 15px var(--primary-color);
}

/* ポップアップのスタイル */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.popup-content h2 {
    margin-bottom: 1rem;
}

.popup-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.popup-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.popup-content p {
    margin-bottom: 1rem;
}

.popup-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--secondary-color);
    color: var(--background-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.popup-close:hover {
    background-color: var(--secondary-light);
}

/* 検索ボックス */
.search-container {
    max-width: 800px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-box {
    display: flex;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-elevation-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}

.search-box:hover,
.search-box:focus-within {
    box-shadow: var(--shadow-elevation-3), 0 0 15px var(--glow-color);
    transform: translateY(-2px);
}

.manufacturer-selector {
    padding: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.manufacturer-selector select {
    width: 150px;
    height: 100%;
    padding: 0 1rem;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
    outline: none;
    font-size: 1rem;
}

.manufacturer-selector select option {
    color: #000000;
    background-color: #ffffff;
}

.search-input-container {
    flex: 1;
    display: flex;
}

#search-input {
    flex: 1;
    padding: 1rem;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
}

#search-input::placeholder {
    color: var(--text-secondary);
}

#search-button {
    padding: 0 1.5rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--secondary-light));
    border: none;
    color: var(--background-color);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

#search-button:hover {
    background: linear-gradient(45deg, var(--secondary-light), var(--secondary-color));
    box-shadow: 0 0 15px var(--secondary-color);
}

/* サジェスト */
a {
    color: var(--text-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.selected-gpu-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 10px;
    margin-right: 1.5rem;
    transition: transform var(--transition-speed);
}

.cpu-item-header img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 5px;
}

.suggestion-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 5px;
}

.suggestions {
    background-color: var(--surface-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-elevation-2);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    position: absolute;
    width: 100%;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
}

.suggestion-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.suggestion-info {
    flex: 1;
}

.suggestion-model {
    font-weight: bold;
}

.suggestion-memory {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 結果表示 */
.results-container {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-elevation-2);
    padding: 2rem;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow var(--transition-speed);
}

.results-container:hover {
    box-shadow: var(--shadow-elevation-3), 0 0 20px rgba(127, 74, 219, 0.3);
}

.selected-gpu {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.selected-gpu:hover .selected-gpu-image {
    transform: scale(1.05);
}

.selected-gpu-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.selected-gpu-specs {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ティア表示 */
.tiers-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .tiers-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tiers-container {
        grid-template-columns: 1fr;
    }
}

.tier {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background-color: var(--surface-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tier:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevation-2);
}

.tier h2 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.tier h2 small {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--background-color);
}

.tier-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.tier-s {
    border-top: 4px solid var(--tier-s-color);
}

.tier-s h2 small {
    background-color: var(--tier-s-color);
}

.tier-a {
    border-top: 4px solid var(--tier-a-color);
}

.tier-a h2 small {
    background-color: var(--tier-a-color);
}

.tier-b {
    border-top: 4px solid var(--tier-b-color);
}

.tier-b h2 small {
    background-color: var(--tier-b-color);
}

.tier-c {
    border-top: 4px solid var(--tier-c-color);
}

.tier-c h2 small {
    background-color: var(--tier-c-color);
}

/* CPU表示 */
.cpu-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cpu-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.cpu-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cpu-model {
    font-weight: bold;
    margin-bottom: 0.2rem;
}

.cpu-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.cpu-spec {
    padding: 0.2rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-speed);
}

.cpu-spec:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.gaming-score {
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.gaming-score-bar {
    height: 6px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 0.25rem;
    overflow: hidden;
    position: relative;
}

.gaming-score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.gaming-score-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* フッター */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
    }

    .lang-btn {
        width: 35px;
        height: 35px;
        font-size: 0.7rem;
    }

    .search-box {
        flex-direction: column;
    }

    .manufacturer-selector {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .manufacturer-selector select {
        width: 100%;
        padding: 1rem;
    }

    .manufacturer-selector select option {
        color: #000000;
        background-color: #ffffff;
    }

    .selected-gpu {
        flex-direction: column;
        text-align: center;
    }

    .selected-gpu-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .tiers-container {
        grid-template-columns: 1fr;
    }
}