/* 右ハンバーガーメニューの追加CSS */
.hamburger-menu.right {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.hamburger-menu.right .menu-content {
    position: absolute;
    top: 60px;
    right: 0;
    width: 300px;
    background: rgba(26, 37, 56, 0.95);
    border-radius: 8px;
    box-shadow: -2px 2px 20px rgba(0,0,0,0.3);
    z-index: 1000;
}
:root {
    --primary-color: #1a2538;       
    --secondary-color: #2c3e52;     
    --accent-color: #ffffff;        
    --highlight-color: #ffffff;     
    --success-color: #ffffff;       
    --error-color: #ffffff;         
    --warning-color: #ffffff;       
    --text-primary: #2c3e50;        
    --text-secondary: #7f8c8d;      
    --text-light: #bdc3c7;         
    --background-primary: #ffffff;  
    --background-secondary: #ecf0f1; 
    --border-color: #ddd;           
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ハンバーガーメニューの共通スタイル */
.hamburger-menu {
    position: fixed;
    top: 20px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-menu.left {
    left: -300px;
}

.hamburger-menu.left.active {
    left: 0;
}

.hamburger-menu.right {
    right: 20px;
}

.hamburger-menu.right.active {
    right: -250px;
}

.hamburger-icon {
    background: rgba(26, 37, 56, 0.9);
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-left: 300px;
    transition: all 0.3s ease;
}

.hamburger-menu.right .hamburger-icon {
    margin-left: 0;
    margin-right: 0;
}

.hamburger-icon:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.menu-content {
    background: rgba(26, 37, 56, 0.95);
    width: 300px;
    min-height: 100vh;
    padding: 80px 0 20px 0;
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 20px rgba(0,0,0,0.3);
}

.hamburger-menu.right .menu-content {
    box-shadow: -2px 0 20px rgba(0,0,0,0.3);
}

.menu-content h3 {
    color: var(--accent-color);
    margin: 0 0 20px 20px;
    font-size: 18px;
    font-weight: bold;
}

.menu-item {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.menu-item.active {
    background: rgba(26, 37, 56, 0.2);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* 共通ボタンスタイル */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--primary-color);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-color);
}

.btn-danger {
    background: var(--primary-color);
    color: white;
}

.btn-danger:hover {
    background: var(--secondary-color);
}

.btn-warning {
    background: var(--primary-color);
    color: white;
}

.btn-warning:hover {
    background: var(--secondary-color);
}

/* フォームスタイル */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--highlight-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* メッセージスタイル */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-bottom: 20px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    margin-bottom: 20px;
}

.info-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #bee5eb;
    margin-bottom: 20px;
}

/* ユーザー情報スタイル */
.user-info {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-info h3 {
    color: var(--accent-color);
    margin: 0 0 5px 0;
    font-size: 16px;
}

.user-info p {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin: 0;
}

/* ログアウトボタン */
.logout-btn {
    background: none !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 16px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* カードスタイル */
.card {
    background: var(--background-primary);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.card-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: var(--background-secondary);
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

/* ローディングスピナー */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--highlight-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .hamburger-menu .menu-content {
        width: 250px;
    }
    
    .hamburger-icon {
        margin-left: 250px;
    }
    
    .hamburger-menu.right .hamburger-icon {
        margin-left: 0;
        margin-right: 250px;
    }
}

/* ユーティリティクラス */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
/* ハンバーガーメニューのレスポンシブ対応 */
@media (max-width: 768px) {
    .hamburger-icon {
        margin-left: 20px !important;
    }
    
    .hamburger-menu.right .hamburger-icon {
        margin-left: 0 !important;
        margin-right: 20px !important;
    }
    
    .hamburger-menu.left {
        left: -280px;
    }
    
    .hamburger-menu.right {
        right: -280px;
    }
    
    .menu-content {
        width: 280px;
    }
}

/* メインコンテンツのスタイル */
.main-content {
    margin-left: 0;
    padding: 20px;
    min-height: 100vh;
}

/* ゲスト通知 */
.guest-notice {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.guest-notice a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.guest-notice a:hover {
    text-decoration: underline;
}

/* プログレス表示 */
.progress-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* コントロールボタン */
.control-buttons {
    text-align: center;
    margin-bottom: 20px;
}

.btn-next {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 単語コンテナ */
.words-container {
    max-width: 800px;
    margin: 0 auto;
}

.loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.loading p {
    margin-top: 20px;
    color: var(--text-primary);
    font-size: 16px;
}

.words-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 単語グリッド */
.words-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* 単語カード */
.word-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.word-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.word-german {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-speak {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-speak:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.word-actions {
    margin-bottom: 15px;
}

.btn-show {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-show:hover {
    background: #34495e;
}

.word-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.detail-item {
    margin-bottom: 10px;
    line-height: 1.5;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    color: var(--primary-color);
    font-weight: bold;
}

/* 単語評価 */
.word-rating {
    margin-top: 15px;
    text-align: center;
}

.btn-toggle {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 80px;
}

.btn-toggle:hover {
    transform: translateY(-2px);
}

.btn-toggle.selected-ok {
    background: var(--primary-color);
    color: white;
}

.btn-toggle.selected-ng {
    background: var(--secondary-color);
    color: white;
}

/* 説明テキスト */
.instructions {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.instructions p {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.instructions p:last-child {
    margin-bottom: 0;
}

/* OK単語リスト */
.ok-word-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ok-word-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ok-word-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.ok-word-german {
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.ok-word-meaning {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    font-style: italic;
}

/* エラーメッセージ */
.error-message {
    text-align: center;
    padding: 40px;
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-radius: 12px;
    color: #c0392b;
}

.error-message h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.error-message p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .word-card {
        padding: 15px;
    }
    
    .word-german {
        font-size: 20px;
    }
    
    .btn-speak {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .progress-text {
        font-size: 16px;
    }
}