﻿/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f0f4f8;
}

/* Ruby (ふりがな) Styles */
ruby {
    ruby-align: center;
    ruby-position: over;
}

rt {
    font-size: 0.6em;
    color: #666;
    font-weight: 400;
    line-height: 1;
}

/* クイズ内のふりがな */
.quiz-content ruby rt {
    font-size: 0.5em;
    color: #777;
}

/* 選択肢内のふりがな */
.choice-btn ruby rt,
.choice-button ruby rt {
    font-size: 0.4em;
    color: #888;
}

/* Game Selection Styles */
.game-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Difficulty Selection Styles */
.difficulty-selection {
    margin: 20px 0;
}

.difficulty-selection h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.difficulty-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 800px;
}

.difficulty-btn {
    background: white;
    border: 3px solid #e0e6ed;
    border-radius: 16px;
    padding: 15px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.difficulty-btn:hover {
    border-color: #3498db;
    background-color: #f8fbff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.2);
}

.difficulty-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background-color: #e8f4f8;
}

.difficulty-btn.active {
    border-color: #27ae60;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
    transform: translateY(-2px);
}

.difficulty-btn.active:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    border-color: #1e8449;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.5);
}

.difficulty-btn i {
    font-size: 2.2em;
    margin-bottom: 2px;
}

.difficulty-btn span {
    font-weight: 700;
    font-size: 1.2em;
    margin-bottom: 2px;
}

.difficulty-btn small {
    font-size: 0.8em;
    opacity: 0.8;
    font-weight: 400;
}

.difficulty-btn.active small {
    opacity: 1;
    font-weight: 500;
}

.difficulty-btn.active i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.difficulty-btn.active span {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.start-button-container {
    margin-top: 30px;
    text-align: center;
}

#start-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 20px 50px;
    font-size: 1.6em;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#start-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(231, 76, 60, 0.4);
}

#start-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

#start-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 難易度選択ボタンのレスポンシブ対応 */
@media (max-width: 768px) {
    .difficulty-buttons {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }
    
    .difficulty-btn {
        min-width: 280px;
        padding: 12px 35px;
    }
    
    .difficulty-btn i {
        font-size: 2em;
    }
    
    .difficulty-btn span {
        font-size: 1.1em;
    }
    
    .difficulty-btn small {
        font-size: 0.75em;
    }
    
    #start-btn {
        padding: 18px 40px;
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .difficulty-btn {
        min-width: 250px;
        padding: 10px 30px;
    }
    
    .difficulty-btn i {
        font-size: 1.8em;
    }
    
    .difficulty-btn span {
        font-size: 1em;
    }
    
    .difficulty-btn small {
        font-size: 0.7em;
    }
    
    #start-btn {
        padding: 16px 35px;
        font-size: 1.2em;
    }
}

.game-card-selection {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card-selection:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.game-card-selection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.game-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.game-icon.typing {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.game-card-selection h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.game-card-selection p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.game-stats span {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-select-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-select-btn:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
}

.page-header {
    text-align: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 42px;
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    color: #666;
}

.back-to-games {
    text-align: center;
    margin-top: 20px;
}

/* Game Type Tabs for Ranking */
.game-type-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.game-tab-button {
    padding: 15px 25px;
    border: 2px solid #e0e6ed;
    background: white;
    color: #666;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.game-tab-button:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.game-tab-button.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.game-tab-button i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .game-type-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-tab-button {
        width: 100%;
    }
}

/* Notice Bar */
.notice-bar {
    background: linear-gradient(45deg, #ff9800, #ffb74d);
    color: #fff;
    padding: 10px 0;
    text-align: center;
    font-size: 21px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notice-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.notice-content i {
    font-size: 16px;
}

.notice-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 5px;
    transition: opacity 0.3s;
}

.notice-link:hover {
    opacity: 0.8;
}

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: #4a90e2;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.main-nav {
    display: block; /* デスクトップでは常に表示 */
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 400;
    font-size: 18px;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #4a90e2;
}

/* ハンバーガーメニューはデスクトップで非表示 */
.hamburger-menu {
    display: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #4a90e2, #7c98f5);
    color: #fff;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero-content {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.hero-text {
    max-width: 60%;
    position: relative;
    z-index: 2;
    margin: auto 30px;
    min-height: 400px;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-text p {
    font-size: 20px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero-text .sub-text {
    font-size: 16px;
    margin-top: 15px;
    opacity: 0.8;
    font-style: italic;
}

.cta-button {
    background-color: #e2544a;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #c9463c;
}

.hero-image {
    max-width: 70%;
    position: absolute;
    right: -50px;
    top: 0;
    z-index: 1;
}

.hero-illustration {
    width: 100%;
    height: auto;
    display: block;
}


/* Main Content */
.main-content {
    padding: 20px 0;
}

/* Ranking Preview Section */
.ranking-preview {
    background-color: #fff;
    padding: 40px 0;
    margin: 0 20px;
    margin-bottom: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ranking-list-detailed {
    max-width: 800px;
    margin: 0 auto;
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.loading-message i {
    margin-right: 10px;
    color: #4a90e2;
}

/* Home Page Ranking Specific Styles */
.no-data-home {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 20px 0;
}

.no-data-home p {
    margin: 10px 0;
}

.no-data-home i {
    color: #f39c12;
    margin-right: 8px;
}

.mini-cta-button {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.mini-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.error-message-home {
    text-align: center;
    padding: 30px 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 15px;
    margin: 20px 0;
}

.error-message-home i {
    margin-right: 8px;
}

.retry-button {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #c82333;
}

.ranking-preview h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.ranking-list {
    max-width: 600px;
    margin: 0 auto 30px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border-left: 5px solid #4a90e2;
}

.ranking-item:first-child {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #f39c12;
}

.ranking-item:nth-child(2) {
    background: linear-gradient(135deg, #e2e3e5, #d1ecf1);
    border-left-color: #6c757d;
}

.ranking-item:nth-child(3) {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left-color: #e74c3c;
}

.rank {
    font-weight: 700;
    font-size: 25px;
    color: #333;
    min-width: 50px;
}

.nickname {
    flex: 1;
    font-weight: 600;
    font-size: 150%;
    color: #555;
    margin-left: 15px;
}

.score {
    font-weight: 700;
    font-size: 150%;
    color: #4a90e2;
    margin-right: 15px;
}

.title {
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.view-all-ranking {
    display: block;
    text-align: center;
    margin: 0 auto;
    padding: 12px 30px;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    max-width: 200px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.view-all-ranking:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* Features Section */
.features {
    padding: 40px 0;
}

.features h2 {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 700;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-card i {
    font-size: 50px;
    color: #4a90e2;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* Game Page Styles */
.game-container {
    min-height: 80vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #f0f4f8, #e8eff7);
}

.game-section {
    /* display: flex; */
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    margin-bottom: 20px;
}

.game-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 960px;
    width: 100%;
    margin: auto;
}

.game-card h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.game-card h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    line-height: 1.4;
}

.nickname-input {
    margin: 30px 0;
}

.nickname-input input {
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    width: 250px;
    margin-bottom: 20px;
    text-align: center;
}

.nickname-input input:focus {
    outline: none;
    border-color: #4a90e2;
}

/* Prefecture Selection Styles */
.prefecture-selection {
    margin: 20px 0;
    text-align: center;
}

.prefecture-selection label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.prefecture-selection select,
#playerPrefecture {
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    color: #333;
    min-width: 200px;
    text-align: center;
    cursor: pointer;
}

.prefecture-selection select:focus,
#playerPrefecture:focus {
    outline: none;
    border-color: #4a90e2;
}

.game-button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px;
}

.game-button.primary {
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
}

.game-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.game-button.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e0e0e0;
}

.game-button.secondary:hover {
    background: #e9ecef;
}

.note {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* Quiz Header */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.quiz-progress {
    background: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quiz-timer {
    background: linear-gradient(45deg, #e74c3c, #ec7063);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

/* Quiz Choices */
#choices-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 50px;
}

.choice-button {
    padding: 80px 70px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    line-height: 1.4;
    min-height: 100px;
    display: flex;
    align-items: center;
}

.choice-button:hover {
    background: #e3f2fd;
    border-color: #4a90e2;
}

.choice-button.selected {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

.choice-button.correct {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.choice-button.incorrect {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}

.choice-btn {
    padding: 40px 35px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    line-height: 1.4;
    min-height: 100px;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.choice-btn:hover {
    background: #e3f2fd;
    border-color: #4a90e2;
}

.choice-btn.selected {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

.choice-btn.correct {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.choice-btn.incorrect {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}

/* Result Styles */
.result-card {
    max-width: 700px;
}

.result-score {
    margin: 30px 0;
}

.score-circle {
    display: inline-block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto;
}

.result-details {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.result-item {
    text-align: center;
}

.result-item .label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.title-badge {
    background: linear-gradient(45deg, #ff6b6b, #ffa8a8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.result-explanation {
    text-align: left;
    margin: 30px 0;
    background: #fff8e1;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #ffc107;
}

.result-explanation h3 {
    color: #333;
    margin-bottom: 15px;
}

.explanation-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #4a90e2;
}

.explanation-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.explanation-answer {
    color: #666;
    line-height: 1.5;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

/* Ranking Page Styles */
.ranking-container {
    min-height: 80vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #f0f4f8, #e8eff7);
}

.page-title {
    text-align: center;
    color: #333;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* Ranking Tabs */
.ranking-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 10px;
}

.tab-button {
    padding: 14px 28px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-button.active {
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    border-color: #4a90e2;
}

.tab-button:hover:not(.active) {
    background: #f8f9fa;
    border-color: #4a90e2;
}

/* Top Three Podium */
.top-three {
    margin-bottom: 50px;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.rank-item {
    background: #fff;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    transition: transform 0.3s;
}

.rank-item:hover {
    transform: translateY(-5px);
}

.rank-1 {
    order: 2;
    transform: scale(1.1);
    background: linear-gradient(135deg, #ffd700, #ffed4e);
}

.rank-2 {
    order: 1;
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
}

.rank-3 {
    order: 3;
    background: linear-gradient(135deg, #cd7f32, #daa520);
}

.rank-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
}

.rank-avatar.winner {
    background: linear-gradient(45deg, #ff6b6b, #ffa8a8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.rank-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 22px;
    min-height: 50px;
    text-align: center;
}

.podium-nickname {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.podium-prefecture {
    font-size: 12px;
    color: #4a90e2;
    font-weight: 500;
}

.rank-score {
    font-size: 26px;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 8px;
}

.rank-position {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Ranking List */
.ranking-list-section {
    margin-bottom: 50px;
}

.ranking-list-section h2 {
    text-align: center;
    color: #333;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 30px;
}

.ranking-list-container {
    background: #fff;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
}

.ranking-item-full {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 20px;
    border-left: 8px solid #4a90e2;
    transition: transform 0.3s;
    font-size: 18px;
    min-height: 65px;
}

.ranking-item-full:hover {
    transform: translateX(5px);
}

.ranking-item-full:nth-child(1) {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #f39c12;
}

.ranking-item-full:nth-child(2) {
    background: linear-gradient(135deg, #e2e3e5, #d1ecf1);
    border-left-color: #6c757d;
}

.ranking-item-full:nth-child(3) {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left-color: #e74c3c;
}

.rank-number {
    font-weight: 700;
    font-size: 18px;
    color: #333;
    min-width: 50px;
}

.rank-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 15px;
}

.rank-number {
    font-weight: 700;
    font-size: 26px;
    color: #333;
    min-width: 70px;
    margin-right: 25px;
    display: flex;
    align-items: center;
}

.rank-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-details {
    display: flex;
    flex-direction: column;
}

.rank-nickname {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 24px;
}

.rank-prefecture {
    font-size: 14px;
    color: #4a90e2;
    font-weight: 500;
    margin-bottom: 2px;
}

.rank-date {
    font-size: 16px;
    color: #666;
}

.rank-score-detail {
    text-align: right;
}

.rank-points {
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 4px;
    font-size: 20px;
}

.rank-title-small {
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

/* Legal Pages */
.legal-container {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 80vh;
}

.legal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 30px;
}

.legal-section h2 {
    color: #333;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a90e2;
}

.legal-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 16px;
}

.legal-section ul {
    color: #555;
    line-height: 1.7;
    margin-left: 20px;
    margin-bottom: 15px;
}

.legal-section ul li {
    margin-bottom: 8px;
    font-size: 16px;
}

.legal-section a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
}

.legal-section a:hover {
    text-decoration: underline;
}

.update-date {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.update-date p {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Success/Error Pages */
.success-container,
.error-container {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.success-card,
.error-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 80px;
    color: #27ae60;
    margin-bottom: 20px;
}

.error-icon {
    font-size: 80px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.success-card h1,
.error-card h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 20px;
}

.success-card p,
.error-card p {
    color: #555;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.success-actions,
.error-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Titles Section */
.titles-section {
    margin-bottom: 50px;
}

.titles-section h2 {
    text-align: center;
    color: #333;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* 称号タブ */
.title-game-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.title-tab-btn {
    padding: 12px 25px;
    border: 2px solid #e0e6ed;
    background: white;
    color: #666;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.title-tab-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* 称号表示エリア */
.titles-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.title-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.title-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.title-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--title-color, linear-gradient(45deg, #667eea, #764ba2));
}

.title-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.title-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--title-color, linear-gradient(45deg, #667eea, #764ba2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.title-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.title-requirements {
    margin-bottom: 12px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #666;
}

.requirement i {
    color: #667eea;
    width: 12px;
}

.title-description {
    color: #777;
    line-height: 1.5;
    font-style: italic;
    font-size: 13px;
}

/* 称号別カラー */
.title-card.beginner { --title-color: linear-gradient(45deg, #95a5a6, #7f8c8d); }
.title-card.sniper { --title-color: linear-gradient(45deg, #3498db, #2980b9); }
.title-card.gunner { --title-color: linear-gradient(45deg, #e74c3c, #c0392b); }
.title-card.shooter { --title-color: linear-gradient(45deg, #f39c12, #e67e22); }
.title-card.master { --title-color: linear-gradient(45deg, #f1c40f, #f39c12); }

.title-card.basic { --title-color: linear-gradient(45deg, #95a5a6, #7f8c8d); }
.title-card.doctor { --title-color: linear-gradient(45deg, #3498db, #2980b9); }
.title-card.moral { --title-color: linear-gradient(45deg, #2ecc71, #27ae60); }
.title-card.security { --title-color: linear-gradient(45deg, #e74c3c, #c0392b); }
.title-card.tech-master { --title-color: linear-gradient(45deg, #9b59b6, #8e44ad); }


@media (max-width: 768px) {
    .title-game-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .title-tab-btn {
        width: 180px;
        justify-content: center;
    }
    
    .titles-display {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
}

/* Quiz Promotion */
.quiz-promotion {
    margin-bottom: 40px;
}

.promotion-card {
    background: linear-gradient(135deg, #4a90e2, #7c98f5);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.promotion-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.promotion-card p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

/* Learn Page Styles */
.learn-container {
    min-height: 80vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #f0f4f8, #e8eff7);
}

.intro-section {
    text-align: center;
    margin: 0 20px 40px;
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.intro-text {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 20px;
}

/* Learning Sections */
.learning-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.section-header h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.learning-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.learning-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #4a90e2;
}

.learning-item h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.learning-item ul {
    margin: 0 0 20px 0;
    padding-left: 20px;
}

.learning-item li {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.quiz-example {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    font-size: 14px;
    color: #1976d2;
}

.educational-benefits {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #28a745;
    margin-top: 15px;
}

.educational-benefits h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.educational-benefits p {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

/* Learning Benefits */
.learning-benefits {
    margin-bottom: 50px;
    text-align: center;
}

.learning-benefits h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.benefit-item {
    background: #fff;
    padding: 30px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.benefit-item h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.benefit-item p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* Guide Section */
.guide-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.guide-section h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.guide-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #28a745;
}

.guide-item h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.guide-item ul {
    margin: 0;
    padding-left: 20px;
}

.guide-item li {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-bottom: 40px;
}

.cta-card {
    background: linear-gradient(135deg, #4a90e2, #7c98f5);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.cta-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.cta-card p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Safety Page Styles */
.safety-container {
    min-height: 80vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #f0f4f8, #e8eff7);
}

.safety-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.safety-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.safety-item {
    display: flex;
    align-items: flex-start;
    padding: 25px;
    background: #f8fffe;
    border-radius: 15px;
    border-left: 5px solid #28a745;
    transition: transform 0.3s;
}

.safety-item:hover {
    transform: translateX(5px);
}

.safety-item-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 20px;
}

.safety-item-content h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.safety-item-content p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Guidelines Section */
.guidelines-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.guidelines-section h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.guidelines-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.guideline-item {
    background: #fff3cd;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #ffc107;
}

.guideline-item h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.guideline-item ul {
    margin: 0;
    padding-left: 20px;
}

.guideline-item li {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Contact Promotion */
.contact-promotion {
    text-align: center;
    margin-bottom: 40px;
}

.contact-card {
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.3);
}

.contact-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.contact-card p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.6;
}

/* About & Contact Page Styles */
.about-container, .contact-container {
    min-height: 80vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #f0f4f8, #e8eff7);
}

/* Mission Section */
.mission-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mission-section h2 {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

.mission-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.mission-item {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s;
}

.mission-item:hover {
    transform: translateY(-5px);
}

.mission-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.mission-item h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.mission-item p {
    color: #666;
    line-height: 1.6;
}

/* Classroom Section */
.classroom-section, .contribution-section, .team-section, .vision-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.classroom-section h2, .contribution-section h2, .team-section h2, .vision-section h2 {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

.classroom-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.classroom-info h3, .classroom-features h3 {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.classroom-info p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.classroom-info ul {
    list-style: none;
    padding: 0;
}

.classroom-info li {
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.classroom-info li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.feature-item i {
    font-size: 30px;
    color: #4a90e2;
    margin-bottom: 10px;
}

.feature-item h4 {
    color: #333;
    margin-bottom: 8px;
}

.feature-item p {
    color: #666;
    font-size: 14px;
}

/* Team Section */
.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.member-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

.member-card h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 8px;
}

.member-role {
    color: #4a90e2;
    font-weight: 600;
    margin-bottom: 15px;
}

.member-description {
    color: #555;
    line-height: 1.6;
}

/* Vision Section */
.vision-content p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
}

.vision-goals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.goal-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.goal-item h3 {
    color: #333;
    margin-bottom: 15px;
}

.goal-item ul {
    list-style: none;
    padding: 0;
}

.goal-item li {
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.goal-item li:before {
    content: "🎯";
    margin-right: 10px;
}

/* Contact Form */
.contact-form-section, .faq-section, .contact-info-section {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-container h2, .faq-section h2, .contact-info-section h2 {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
}

.submit-button {
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    width: 100%;
}

.submit-button:hover {
    transform: translateY(-2px);
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.faq-item h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Contact Methods */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-method {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #7c98f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
}

.contact-method h3 {
    color: #333;
    margin-bottom: 10px;
}

.contact-method p {
    color: #555;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-method small {
    color: #888;
    font-size: 14px;
}

/* Thanks Section */
.thanks-section {
    text-align: center;
    margin-bottom: 40px;
}

.thanks-card {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.thanks-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.thanks-card p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #ffffff;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #777;
}

.footer-links a {
    text-decoration: none;
    color: #777;
    margin-right: 20px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #333;
}

.social-media a {
    color: #777;
    font-size: 20px;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-media a:hover {
    color: #4a90e2;
}

/* ====================================
   レスポンシブ対応
   ==================================== */

/* オーバーレイメニューのスタイル */
.overlay {
    height: 100%;
    width: 0; /* 初期状態では非表示 */
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0, 0.9);
    overflow-x: hidden;
    transition: 0.5s;
}

.overlay-content {
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #fff;
    display: block;
    transition: 0.3s;
}

.overlay a:hover, .overlay a:focus {
    color: #e2544a;
}

.overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
}

/* Small devices (phones, 600px and down) */
@media (max-width: 600px) {
    /* Header */
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger-menu {
        display: block; /* ハンバーガーメニューを表示 */
        background: none;
        border: none;
        color: #555;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
    }

    .main-nav {
        display: none; /* デスクトップメニューは非表示 */
    }

    /* Hero Section */
    .hero-section {
        min-height: 400px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0;
        /* padding-top: 20px;
        padding-bottom: 20px; */
        justify-content: center;

    }

    .hero-text {
        max-width: 100%;
        margin: 0;
        min-height: auto;
        z-index: 2;
    }
    
    .hero-image {
        max-width: 100%;
        position: relative;
        right: 0;
        top: auto;
        margin-top: 20px;
        z-index: 1;
    }

    .hero-text h1 {
        font-size: 30px;
        margin: 20px 0px;
    }

    .cta-button {
        font-size: 16px;
        padding: 10px 20px;
    }

    /* Ranking and Features Sections */
    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
        padding: 15px;
    }

    .nickname, .score, .title {
        margin: 5px 0;
    }

    .feature-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 25px 20px;
    }

    /* Game Page Mobile Styles */
    .game-card {
        padding: 25px 10px;
        margin: auto;
        max-width: 350px;
    }

    .nickname-input input {
        width: 200px;
        font-size: 16px;
    }

    .quiz-header {
        flex-direction: column;
        gap: 15px;
        padding: 0 10px;
    }

    #choices-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .choice-button {
        padding: 70px 50px;
        font-size: 28px;
        min-height: 90px;
    }
    
    .choice-btn {
        padding: 20px 20px;
        font-size: 26px;
        min-height: 90px;
    }

    .result-details {
        flex-direction: column;
        gap: 15px;
    }

    .result-actions {
        flex-direction: column;
    }

    .game-button {
        width: 100%;
        max-width: 300px;
    }

    /* Ranking Page Mobile Styles */
    .page-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .ranking-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-button {
        font-size: 14px;
        padding: 10px 16px;
    }

    .podium {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .rank-item {
        min-width: 200px;
        margin-bottom: 15px;
    }

    .rank-1 {
        order: 1;
        transform: scale(1);
    }

    .rank-2 {
        order: 2;
    }

    .rank-3 {
        order: 3;
    }

    .ranking-list-container {
        padding: 30px;
        margin: 0 15px;
    }

    .ranking-item-full {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        font-size: 16px;
        min-height: 55px;
    }

    .rank-info {
        width: 100%;
        margin-top: 10px;
    }
    
    .rank-nickname {
        font-size: 20px;
    }
    
    .rank-prefecture {
        font-size: 12px;
    }
    
    .podium-nickname {
        font-size: 16px;
    }
    
    .podium-prefecture {
        font-size: 10px;
    }
    
    .rank-points {
        font-size: 22px;
    }
    
    .rank-title-small {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .rank-date {
        font-size: 14px;
    }
    
    .rank-number {
        font-size: 20px;
        min-width: 55px;
        margin-right: 18px;
    }
    
    /* トップ3表彰台 */
    .rank-name {
        font-size: 18px;
        min-height: 20px;
    }
    
    .rank-score {
        font-size: 22px;
    }
    
    .rank-position {
        font-size: 16px;
        padding: 6px 14px;
    }
    
    /* お知らせバー */
    .notice-bar {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .notice-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .notice-link {
        margin-left: 0;
    }
    
    /* 法的ページ */
    .legal-content {
        padding: 25px;
    }
    
    .legal-section h2 {
        font-size: 20px;
    }
    
    .legal-section p,
    .legal-section ul li {
        font-size: 14px;
    }
    
    /* 成功・エラーページ */
    .success-card,
    .error-card {
        padding: 30px;
    }
    
    .success-icon,
    .error-icon {
        font-size: 60px;
    }
    
    .success-card h1,
    .error-card h1 {
        font-size: 24px;
    }
    
    .success-card p,
    .error-card p {
        font-size: 16px;
    }
    
    .success-actions,
    .error-actions {
        flex-direction: column;
        gap: 10px;
    }

    .titles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .title-item {
        padding: 20px 15px;
    }

    .title-icon {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .promotion-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .promotion-card h3 {
        font-size: 20px;
    }

    /* Learn Page Mobile Styles */
    .intro-section {
        padding: 25px 20px;
        margin: 0 10px 40px;
    }

    .intro-text {
        font-size: 16px;
    }

    .learning-section {
        padding: 30px 20px;
        margin: 0 10px 40px;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .section-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .learning-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .learning-item {
        padding: 20px;
    }

    .learning-item h3 {
        font-size: 18px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .benefit-item {
        padding: 25px 20px;
    }

    .guide-section {
        padding: 30px 20px;
        margin: 0 10px 40px;
    }

    .guide-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .guide-item {
        padding: 20px;
    }

    .cta-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    /* Safety Page Mobile Styles */
    .safety-section {
        padding: 30px 20px;
        margin: 0 10px 40px;
    }

    .safety-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 20px;
    }

    .safety-item-icon {
        margin-right: 0;
        margin-bottom: 15px;
        align-self: center;
    }

    .safety-item-content h3 {
        font-size: 18px;
    }

    .guidelines-section {
        padding: 30px 20px;
        margin: 0 10px 40px;
    }

    .guidelines-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .guideline-item {
        padding: 20px;
    }

    .contact-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    /* About & Contact Page Mobile Styles */
    .mission-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mission-item {
        padding: 25px 15px;
    }

    .classroom-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .team-members {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .member-card {
        padding: 25px 20px;
    }

    .vision-goals {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-form-section, .faq-section, .contact-info-section,
    .classroom-section, .contribution-section, .team-section, .vision-section {
        padding: 30px 20px;
        margin: 0 10px 40px;
    }

    .contact-methods {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .thanks-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .form-group input, .form-group select, .form-group textarea {
        font-size: 16px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        margin-bottom: 15px;
        text-align: center;
    }

    .footer-links a {
        margin: 0 10px;
    }

    .social-media a {
        font-size: 18px;
        margin: 0 10px;
    }
}

/* Updates Page Styles */
.updates-list {
    max-width: 800px;
    margin: 0 auto;
}

.update-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    padding: 25px;
    transition: all 0.3s ease;
}

.update-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    border-color: #4a90e2;
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.update-title {
    color: #333;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.update-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-date {
    color: #666;
    font-size: 16px;
    font-weight: 600;
}

.new-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.update-content {
    color: #555;
    line-height: 1.7;
    font-size: 16px;
}

.update-content p {
    margin: 0;
}

/* Medium devices (tablets, 601px to 992px) */
@media (min-width: 601px) and (max-width: 992px) {
    /* Header */
    .main-nav li {
        margin-left: 20px;
    }

    /* Hero Section */
    .hero-text h1 {
        font-size: 40px;
    }

    /* Ranking and Features Sections */
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Updates Page Mobile Styles */
    .update-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .update-title {
        font-size: 20px;
    }
}