:root {
    --color-bg: #ffffff;
    --color-text: #171a20;
    --color-text-secondary: #5c5e62;
    --color-accent: #3e6ae1;
    --color-border: #e2e2e2;
    --color-hover: #f4f4f4;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    cursor: pointer;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    margin-left: 30px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-text-secondary);
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 60px;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

/* Search Input in Hero */
.hero-search {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    position: relative;
}

.search-input-container {
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    background: white;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.hero-search input:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 1px var(--color-text);
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 10px;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--color-text);
}

/* Filters Section */
.filters-section {
    background: #f9f9f9;
    border-bottom: 1px solid var(--color-border);
    padding: 40px 0;
}

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

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 14px;
    color: var(--color-text);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs select,
.range-inputs input {
    min-width: 0;
    flex: 1;
}

.range-inputs span {
    color: var(--color-text-secondary);
}

.advanced-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.search-input-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.search-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.info {
    padding: 15px;
    background: #f9f9f9;
    font-size: 12px;
    color: var(--color-text-secondary);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
}

/* Loading & Error */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 最前面に表示 */
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-text);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
    background: #fdf0ed;
    border-radius: var(--radius-md);
    margin: 20px auto;
    max-width: 600px;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 1px;
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-group label {
    display: flex !important; /* Override .filter-group label display: block */
    align-items: center;
    gap: 10px;
    font-weight: 400 !important;
    text-transform: none !important;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto !important; /* Override .filter-group input width: 100% */
    margin: 0;
    cursor: pointer;
}

.ea-filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.filter-subgroup label {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 5px;
    display: none;
}

.suggestions-dropdown.active {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background-color: var(--color-hover);
}

.skin-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.skin-suggestion-item:hover {
    background-color: var(--color-hover);
}

/* Selected Tags */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag, .selected-skin-tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-remove, .remove-skin {
    cursor: pointer;
    color: #999;
    font-weight: bold;
    margin-left: 5px;
}

.tag-remove:hover, .remove-skin:hover {
    color: #666;
}

/* Form Actions & Buttons */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.btn-primary {
    background-color: var(--color-text);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: black;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Results Section */
.results-section {
    padding: 60px 0;
    min-height: 400px;
}

.results-header {
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 24px;
    font-weight: 500;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Account Card */
.account-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
}

.account-card .title {
    font-size: 16px;
    font-weight: 600;
    margin: 15px 15px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-card .price {
    font-size: 18px;
    color: var(--color-text);
    margin: 0 15px 15px;
    font-weight: 500;
}

.account-card .info {
    padding: 15px;
    background: #f9f9f9;
    font-size: 12px;
    color: var(--color-text-secondary);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
}

/* Loading & Error */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 最前面に表示 */
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-text);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
    background: #fdf0ed;
    border-radius: var(--radius-md);
    margin: 20px auto;
    max-width: 600px;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 1px;
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-group label {
    display: flex !important; /* Override .filter-group label display: block */
    align-items: center;
    gap: 10px;
    font-weight: 400 !important;
    text-transform: none !important;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto !important; /* Override .filter-group input width: 100% */
    margin: 0;
    cursor: pointer;
}

.ea-filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.filter-subgroup label {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .navbar {
        padding: 15px 20px;
    }
    
    .nav-links {
        display: none; /* モバイルメニューは省略 */
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}
