/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ログイン後の背景を元のグラデーションに戻す */
body.logged-in {
    background: linear-gradient(135deg, #ffffff 0%, #e8f0fe 25%, #f3e5f5 50%, #e8f0fe 75%, #ffffff 100%);
    background-attachment: fixed;
}

/* 背景動画 */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

/* ログイン後は動画を非表示 */
body.logged-in .background-video {
    display: none;
}

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

/* ヘッダー */
.header {
    background: transparent;
    color: #283593;
    padding: 1.2rem 0;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: none;
    transition: all 0.3s ease;
}

body.logged-in .header {
    background: transparent;
    color: #283593;
    box-shadow: none;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.logo-link {
    display: inline-block;
    margin: 0;
    padding: 0;
    line-height: 1;
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo-link:hover .logo-image {
    opacity: 0.8;
}

/* ログイン後もロゴ画像のスタイルは同じ */

.nav {
    display: flex;
    gap: 1rem;
}

/* ボタン */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to right, #56C1FF 0%, #0076BA 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 118, 186, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 186, 0.5);
    background: linear-gradient(to right, #45a8e6 0%, #005a94 100%);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #283593;
}

/* メインコンテンツ */
.main {
    padding: 0;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* ヒーローセクション */
.hero-section {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    background: transparent;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title-container {
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.title-ai {
    color: #333;
}

.title-slash {
    color: #666;
    margin: 0 0.5rem;
}

.title-trade {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #283593;
    padding: 0.3rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(40, 53, 147, 0.2);
}

.hero-brand {
    font-size: 4rem;
    font-weight: 900;
    color: #283593;
    margin: 1rem 0;
    letter-spacing: -0.02em;
}

.hero-logo-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-image {
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
}

.hero-logo-text {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-ai-trade {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.logo-ai {
    background: linear-gradient(180deg, #0066ff 0%, #00aaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-transform: uppercase;
}

.logo-slash {
    background: linear-gradient(180deg, #0066ff 0%, #00aaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0.5rem;
    font-weight: 900;
}

.logo-trade {
    background: #87ceeb;
    color: #ffffff;
    padding: 0.3rem 1.5rem;
    border-radius: 0;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: none;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0;
    line-height: 1.4;
}

.hero-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin: 2rem auto;
    max-width: 700px;
    text-align: left;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 150px;
}

.btn-hero.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #283593;
    border: 2px solid #283593;
}

.btn-hero.btn-secondary:hover {
    background: #283593;
    color: white;
}

/* メインコンテンツ（ログイン済み時） */
.main-content {
    padding: 2rem 0;
}

/* ヘッダーのロゴ（画像ロゴの場合、色やテキストシャドウのスタイルは不要） */

/* ナレッジセクション */
.knowledge-section {
    margin-bottom: 3rem;
}

.knowledge-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.knowledge-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.knowledge-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.knowledge-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.knowledge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.knowledge-title {
    font-size: 1.4rem;
    color: #2c3e50;
    flex: 1;
    margin-right: 1rem;
}

.knowledge-category {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.knowledge-category.technical {
    background: #e3f2fd;
    color: #1976d2;
}

.knowledge-category.fundamental {
    background: #f3e5f5;
    color: #7b1fa2;
}

.knowledge-category.strategy {
    background: #e8f5e8;
    color: #388e3c;
}

.knowledge-category.risk {
    background: #fff3e0;
    color: #f57c00;
}

.knowledge-category.psychology {
    background: #fce4ec;
    color: #c2185b;
}

.knowledge-category.other {
    background: #f5f5f5;
    color: #616161;
}

.knowledge-content {
    margin-bottom: 1.5rem;
}

.knowledge-content p {
    color: #555;
    line-height: 1.7;
}

.knowledge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.knowledge-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.knowledge-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* 最新ナレッジセクション */
.knowledge-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(232, 240, 254, 0.6) 50%, rgba(243, 229, 245, 0.6) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(40, 53, 147, 0.15);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 240, 254, 0.5);
}

.knowledge-section h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #283593;
    font-weight: 600;
}

.knowledge-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #495057;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.knowledge-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.knowledge-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 240, 254, 0.7) 100%);
    border: 1px solid rgba(232, 240, 254, 0.8);
    border-radius: 15px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 53, 147, 0.1);
}

.knowledge-card:hover {
    box-shadow: 0 8px 25px rgba(40, 53, 147, 0.2);
    transform: translateY(-4px);
    border-color: rgba(63, 81, 181, 0.5);
}

.knowledge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.knowledge-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #283593;
    margin: 0;
    flex: 1;
    margin-right: 1rem;
}

.knowledge-card-category {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.knowledge-card-category.technical {
    background: #e3f2fd;
    color: #1976d2;
}

.knowledge-card-category.fundamental {
    background: #f3e5f5;
    color: #7b1fa2;
}

.knowledge-card-category.strategy {
    background: #e8f5e8;
    color: #388e3c;
}

.knowledge-card-category.risk {
    background: #fff3e0;
    color: #f57c00;
}

.knowledge-card-category.psychology {
    background: #fce4ec;
    color: #c2185b;
}

.knowledge-card-category.other {
    background: #f5f5f5;
    color: #616161;
}

.knowledge-card-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.knowledge-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.knowledge-card-stats {
    display: flex;
    gap: 1rem;
}

.knowledge-card-source {
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #495057;
}

.knowledge-card-confidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confidence-bar {
    width: 60px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545, #ffc107, #28a745);
    transition: width 0.3s ease;
}

.knowledge-stats-overview {
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.5) 0%, rgba(243, 229, 245, 0.5) 100%);
    padding: 1.8rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid rgba(232, 240, 254, 0.8);
}

.knowledge-stats-overview h4 {
    color: #283593;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.knowledge-stats-overview p {
    color: #666;
    margin: 0.5rem 0;
    font-size: 1rem;
}

/* 共有セクション */
.share-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(243, 229, 245, 0.6) 50%, rgba(232, 240, 254, 0.6) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(40, 53, 147, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(243, 229, 245, 0.5);
}

.share-section h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #283593;
    font-weight: 600;
}

.share-form-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ログイン要求メッセージ */
.login-required-message {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.8) 0%, rgba(243, 229, 245, 0.8) 100%);
    border-radius: 15px;
    border: 2px dashed rgba(63, 81, 181, 0.3);
}

.login-required-message .message-content {
    max-width: 400px;
    margin: 0 auto;
}

.login-required-message p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.login-required-message .btn {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.login-required-message .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.knowledge-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #495057;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="number"] {
    width: 150px;
}

/* ボタンスタイル */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to right, #56C1FF 0%, #0076BA 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 118, 186, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to right, #45a8e6 0%, #005a94 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 186, 0.5);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ローディング状態 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(232, 240, 254, 0.5);
    border-top: 2px solid #3f51b5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* エラーメッセージ */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

/* ナレッジ管理セクション */
.knowledge-management {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(232, 240, 254, 0.6) 50%, rgba(243, 229, 245, 0.6) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(40, 53, 147, 0.15);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 240, 254, 0.5);
}

.knowledge-management h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #283593;
    font-weight: 600;
}

.knowledge-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.knowledge-controls .btn {
    min-width: 150px;
}

.my-knowledge-list {
    margin-top: 2rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.5) 0%, rgba(243, 229, 245, 0.5) 100%);
    border-radius: 15px;
    border: 1px solid rgba(232, 240, 254, 0.8);
}

.my-knowledge-list h4 {
    color: #283593;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.knowledge-items {
    display: grid;
    gap: 1rem;
}

.knowledge-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 240, 254, 0.7) 100%);
    padding: 1.8rem;
    border-radius: 15px;
    border: 1px solid rgba(232, 240, 254, 0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 53, 147, 0.1);
}

.knowledge-item:hover {
    box-shadow: 0 8px 25px rgba(40, 53, 147, 0.2);
    transform: translateY(-4px);
    border-color: rgba(63, 81, 181, 0.5);
}

.knowledge-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.knowledge-item-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.knowledge-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.knowledge-item-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.knowledge-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.knowledge-item-actions {
    display: flex;
    gap: 0.5rem;
}

.knowledge-item-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.knowledge-form-container {
    margin-top: 2rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.5) 0%, rgba(243, 229, 245, 0.5) 100%);
    border-radius: 15px;
    border: 1px solid rgba(232, 240, 254, 0.8);
}

.knowledge-form-container h4 {
    color: #283593;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-actions .btn {
    min-width: 100px;
}

/* ナレッジ詳細モーダル */
.knowledge-detail {
    max-width: 600px;
    margin: 0 auto;
}

.knowledge-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.knowledge-detail-title {
    font-size: 1.5rem;
    color: #283593;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.knowledge-detail-meta {
    color: #666;
    font-size: 0.9rem;
}

.knowledge-detail-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #555;
}

.knowledge-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.knowledge-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.knowledge-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #283593;
    margin-bottom: 0.5rem;
}

.knowledge-stat-label {
    font-size: 0.9rem;
    color: #666;
}

.knowledge-detail-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .header .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ヒーローセクション レスポンシブ */
    .hero-section {
        min-height: calc(100vh - 120px);
        padding: 3rem 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.3rem;
    }

    .title-slash {
        display: none;
    }

    .title-trade {
        padding: 0.25rem 1rem;
        border-radius: 8px;
    }

    .hero-brand {
        font-size: 2.5rem;
    }

    .hero-logo-image {
        max-height: 150px;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
        text-align: center;
        margin: 1.5rem 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .btn-hero {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .knowledge-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .knowledge-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
        overflow-y: auto;
    }

    .knowledge-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-select {
        width: 100%;
        max-width: 300px;
    }
    
    .knowledge-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .knowledge-card-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .knowledge-card-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .knowledge-form {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-brand {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .logo-image {
        height: 45px;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ヒーローセクションのアニメーション */
.hero-content {
    animation: fadeIn 0.8s ease-out;
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 成功・エラーメッセージ */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ナレッジ管理セクション */
.knowledge-management {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(232, 240, 254, 0.6) 50%, rgba(243, 229, 245, 0.6) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(40, 53, 147, 0.15);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 240, 254, 0.5);
}

.knowledge-management h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #283593;
    font-weight: 600;
}

.knowledge-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.knowledge-controls .btn {
    min-width: 150px;
}

.my-knowledge-list {
    margin-top: 2rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.5) 0%, rgba(243, 229, 245, 0.5) 100%);
    border-radius: 15px;
    border: 1px solid rgba(232, 240, 254, 0.8);
}

.my-knowledge-list h4 {
    color: #283593;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.knowledge-items {
    display: grid;
    gap: 1rem;
}

.knowledge-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 240, 254, 0.7) 100%);
    padding: 1.8rem;
    border-radius: 15px;
    border: 1px solid rgba(232, 240, 254, 0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 53, 147, 0.1);
}

.knowledge-item:hover {
    box-shadow: 0 8px 25px rgba(40, 53, 147, 0.2);
    transform: translateY(-4px);
    border-color: rgba(63, 81, 181, 0.5);
}

.knowledge-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.knowledge-item-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.knowledge-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.knowledge-item-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.knowledge-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.knowledge-item-actions {
    display: flex;
    gap: 0.5rem;
}

.knowledge-item-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.knowledge-form-container {
    margin-top: 2rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.5) 0%, rgba(243, 229, 245, 0.5) 100%);
    border-radius: 15px;
    border: 1px solid rgba(232, 240, 254, 0.8);
}

.knowledge-form-container h4 {
    color: #283593;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-actions .btn {
    min-width: 100px;
}

/* ナレッジ詳細モーダル */
.knowledge-detail {
    max-width: 600px;
    margin: 0 auto;
}

.knowledge-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.knowledge-detail-title {
    font-size: 1.5rem;
    color: #283593;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.knowledge-detail-meta {
    color: #666;
    font-size: 0.9rem;
}

.knowledge-detail-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #555;
}

.knowledge-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.knowledge-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.knowledge-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #283593;
    margin-bottom: 0.5rem;
}

.knowledge-stat-label {
    font-size: 0.9rem;
    color: #666;
}

.knowledge-detail-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .knowledge-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .knowledge-controls .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .knowledge-item-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .knowledge-item-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .knowledge-item-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .knowledge-detail-stats {
        grid-template-columns: 1fr;
    }
}

/* ログアウト後の画面制御 */
.welcome-message {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3f51b5 100%);
    color: white;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(26, 35, 126, 0.3);
}

.welcome-message h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.welcome-message p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.email-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.email-form h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.email-form .form-group {
    margin-bottom: 1.5rem;
}

.email-form label {
    display: block;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.email-form input[type="email"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.email-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    min-width: 150px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ログアウト状態での画面レイアウト */
body.logged-out .knowledge-management,
body.logged-out .share-section,
body.logged-out .main-content {
    display: none !important;
}

body.logged-out .hero-section {
    display: flex !important;
}

body.logged-in .hero-section {
    display: none !important;
}

body.logged-in .main-content {
    display: block !important;
}

body.logged-in .footer {
    display: block !important;
}

body.logged-out .footer {
    display: none !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .welcome-message h2 {
        font-size: 2rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 240, 254, 0.7) 100%);
    margin: 2% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(40, 53, 147, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 240, 254, 0.8);
    scrollbar-width: thin;
    scrollbar-color: rgba(63, 81, 181, 0.5) transparent;
}

/* スクロールバーのスタイル（Webkit系ブラウザ） */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(63, 81, 181, 0.5);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(63, 81, 181, 0.7);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* 認証フォームスタイル */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.auth-form input,
.auth-form select {
    padding: 0.8rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.auth-form .btn {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.auth-form .btn-primary {
    background: linear-gradient(to right, #56C1FF 0%, #0076BA 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 118, 186, 0.3);
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 186, 0.5);
    background: linear-gradient(to right, #45a8e6 0%, #005a94 100%);
}

.auth-form .btn-secondary {
    background: #6c757d;
    color: white;
}

.auth-form .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 認証リンクスタイル */
.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-switch,
.auth-forgot {
    margin: 0.5rem 0;
}

.auth-switch a,
.auth-forgot a {
    color: #3f51b5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-switch a:hover,
.auth-forgot a:hover {
    color: #283593;
    text-decoration: underline;
}

/* フォームヘルプテキスト */
.form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

/* 新規登録3ステップ形式 */
.registration-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-section {
    padding: 0.5rem 0;
}

.step-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.step-number {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.step-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.step-description {
    color: #333;
    margin: 1rem 0;
    line-height: 1.6;
}

.btn-application {
    background: linear-gradient(to right, #88FA4E 0%, #1DB100 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(29, 177, 0, 0.3);
}

.btn-application:hover {
    background: linear-gradient(to right, #7ae043 0%, #18a000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 177, 0, 0.5);
}

.btn-application:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-application:disabled:hover {
    transform: none;
    box-shadow: none;
}

.step-divider {
    border-top: 2px dashed #ccc;
    margin: 1.5rem 0;
}

/* STEP3はstep-sectionクラスを使用するため、step-panelスタイルは削除 */

/* 新規登録フォーム用のモーダル幅拡張 */
.modal-content .registration-steps {
    max-width: 100%;
}

/* レスポンシブ対応：新規登録フォーム */
@media (max-width: 768px) {
    .step-section {
        padding: 0rem 0;
    }
    
    .step-title {
        font-size: 1.2rem;
    }
    
    .btn-application {
        width: 100%;
        padding: 0.9rem 1.5rem;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal-content {
        margin: 2% auto;
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .auth-form .btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}
