:root {
    --bg-base: #0f172a; /* Dark Navy */
    --bg-glass: rgba(30, 41, 59, 0.6);
    --bg-glass-hover: rgba(30, 41, 59, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gold-accent: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.2);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-focus: #fbbf24;
    --premium-gradient: linear-gradient(135deg, #f59e0b, #b45309);
    --premium-glow: rgba(245, 158, 11, 0.4);
    
    --font-family: 'Inter', 'Noto Sans JP', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

.gold-text {
    color: var(--gold-accent);
    text-shadow: 0 0 15px var(--gold-glow);
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header {
    padding: 90px 0 75px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    margin-bottom: 50px;
    overflow: hidden;
    /* Rich, depth-focused background */
    background: 
        radial-gradient(ellipse at center 40%, rgba(251, 191, 36, 0.12) 0%, rgba(15, 23, 42, 0) 60%),
        radial-gradient(ellipse at center top, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 1) 100%),
        var(--bg-base);
}

/* Elegant abstract geometric pattern */
.header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.04;
    background-image: 
        linear-gradient(30deg, #fbbf24 12%, transparent 12.5%, transparent 87%, #fbbf24 87.5%, #fbbf24),
        linear-gradient(150deg, #fbbf24 12%, transparent 12.5%, transparent 87%, #fbbf24 87.5%, #fbbf24),
        linear-gradient(30deg, #fbbf24 12%, transparent 12.5%, transparent 87%, #fbbf24 87.5%, #fbbf24),
        linear-gradient(150deg, #fbbf24 12%, transparent 12.5%, transparent 87%, #fbbf24 87.5%, #fbbf24),
        linear-gradient(60deg, #fbbf24 25%, transparent 25.5%, transparent 75%, #fbbf24 75%, #fbbf24),
        linear-gradient(60deg, #fbbf24 25%, transparent 25.5%, transparent 75%, #fbbf24 75%, #fbbf24);
    background-size: 40px 70px;
    background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    z-index: 0;
    pointer-events: none;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 800px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.brand-logo-container {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 20px rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.premium-badge {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: white;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 14px;
    margin-left: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.header h1 {
    font-size: 44px;
    font-weight: 900;
    margin-bottom: 24px;
    letter-spacing: 4px;
    line-height: 1.4;
    /* Jewel-like Gold Gradient */
    background: linear-gradient(135deg, #ffffff 0%, #fef08a 30%, #fbbf24 70%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback */
    /* Elegant outer glow */
    filter: drop-shadow(0 0 25px rgba(251, 191, 36, 0.35)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
    position: relative;
    z-index: 2;
}

.header p.subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 16px !important;
    font-weight: 500;
    letter-spacing: 0.15em !important;
    line-height: 1.8;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85) !important;
  letter-spacing: 0.15em !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
  font-weight: 700 !important;
  margin-top: 1rem !important;
}

/* Search Section */
.search-section {
    padding: 36px 32px;
    margin-bottom: 40px;
    overflow: visible !important;
    position: relative;
    z-index: 10000 !important;
}

.search-controls {
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}
.search-controls .input-group {
    width: 100%;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #cbd5e1;
    letter-spacing: 1px;
}

/* Custom Dropdown Styling */
.custom-select {
    position: relative;
    width: 100%;
    z-index: 20;
}
.select-selected {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    transition: var(--transition);
}
.select-selected:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}
.select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-base);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    z-index: 10000 !important;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}
.select-hide {
    display: none;
}
.select-items div {
    padding: 14px 20px;
    cursor: pointer;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}
.select-items div:last-child {
    border-bottom: none;
}
.select-items div:hover {
    background-color: var(--bg-glass-hover);
    color: var(--gold-accent);
}



/* Home Message */
.home-message {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), inset 0 0 40px rgba(251, 191, 36, 0.05);
}

.home-message-icon {
    font-size: 44px;
    margin-bottom: 24px;
}

.home-message h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.home-message p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Card Grid & Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding-bottom: 80px;
}

.prompt-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gold-accent);
    opacity: 0;
    transition: var(--transition);
}

.prompt-card:hover {
    transform: translateY(-8px);
    background: var(--bg-glass-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--gold-glow);
    border-color: rgba(251, 191, 36, 0.4);
}

.prompt-card:hover::before {
    opacity: 1;
}

.card-category {
    display: inline-block;
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold-accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 18px;
    align-self: flex-start;
    border: 1px solid rgba(251, 191, 36, 0.3);
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-problem {
    font-size: 15.5px; /* Larger text for readability */
    color: #e2e8f0; /* Brighter color for clear visibility */
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
    flex-grow: 1; /* Occupy remaining space to keep layout balanced */
}

.card-problem i {
    color: #f87171;
    margin-top: 5px;
    font-size: 16px;
}

/* Premium Action Button */
.premium-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--premium-gradient);
    color: white;
    text-decoration: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    box-shadow: 0 6px 20px var(--premium-glow);
    margin-top: auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
    cursor: pointer;
}

.premium-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent, transparent);
    transform: rotate(45deg);
    transition: var(--transition);
}

.premium-btn i {
    margin-right: 10px;
    font-size: 20px;
}

.premium-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.6);
    filter: brightness(1.1);
}

.premium-btn:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Modal Window Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 30px;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: var(--bg-glass);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(251, 191, 36, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--gold-accent);
    transform: scale(1.1);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold-accent);
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    padding-bottom: 16px;
    text-shadow: 0 0 10px var(--gold-glow);
}

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.modal-body pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-main);
}

.modal-footer {
    text-align: center;
    padding-top: 10px;
}

.modal-copy-btn {
    display: inline-flex;
    width: auto;
    padding: 16px 40px;
    font-size: 16px;
}

@media (max-width: 768px) {
    
    .header { padding: 60px 0 50px; }
    .header h1 { 
        font-size: 34px; 
        letter-spacing: 2px;
    }
}

@media (max-width: 430px) {
    .header { padding: 50px 0 40px; }
    .header h1 {
        /* 2行構成かつ中央揃えで、画面に美しく収める */
        font-size: clamp(26px, 8vw, 36px); 
        letter-spacing: 1px;
        line-height: 1.4;
        white-space: normal; /* <br>で意図した改行のみを有効にする */
    }
    .header .subtitle {
        font-size: 14px;
        padding: 0 15px;
        line-height: 1.7;
        letter-spacing: 1px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-container { overflow: visible !important; position: relative; }


#category-filter, .select-items, .custom-select { position: relative !important; z-index: 10000 !important; }

