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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.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(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

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

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

/* メインコンテンツ */
.main {
    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: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.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: #007bff;
}

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

.knowledge-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.knowledge-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.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: #2c3e50;
    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: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 2rem;
}

.knowledge-stats-overview h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

/* 共有セクション */
.share-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

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

/* ログイン要求メッセージ */
.login-required-message {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.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: #007bff;
}

.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: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.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 #f3f3f3;
    border-top: 2px solid #007bff;
    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: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.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.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.my-knowledge-list h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.knowledge-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.knowledge-item:hover {
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.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.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.knowledge-form-container h4 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.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: #2c3e50;
    margin-bottom: 0.5rem;
}

.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: #2c3e50;
    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;
    }
    
    .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: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .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;
    }
}

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

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

/* ローディング状態 */
.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: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.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.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.my-knowledge-list h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.knowledge-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.knowledge-item:hover {
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.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.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.knowledge-form-container h4 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.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: #2c3e50;
    margin-bottom: 0.5rem;
}

.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: #2c3e50;
    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: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.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 {
    display: none !important;
}

body.logged-out .knowledge-section {
    margin-top: 2rem;
}

/* レスポンシブ対応 */
@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-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@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: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 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(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.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: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

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

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