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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
}

.game-info span {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: white;
    color: #f5576c;
    border-bottom: 3px solid #f5576c;
}

.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* プログレスバー */
.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    font-weight: bold;
    color: #333;
}

/* 孵化セクション */
.hatch-section {
    text-align: center;
}

.hatch-section h2 {
    color: #f5576c;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.egg-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.egg {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 300px;
}

.egg-icon {
    font-size: 100px;
    animation: wobble 2s infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.egg.ready .egg-icon {
    animation: wobble 0.5s infinite, glow 1s infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 10px #ff0); }
    50% { filter: drop-shadow(0 0 20px #ff0); }
}

.egg-info {
    margin-top: 20px;
    font-size: 1.1em;
    color: #333;
}

.egg-timer {
    font-weight: bold;
    color: #f5576c;
    margin-top: 10px;
}

.hatch-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ボタンスタイル */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #333;
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* ドラゴングリッド */
.dragons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.dragon-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

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

.dragon-icon {
    font-size: 60px;
    text-align: center;
    margin-bottom: 10px;
}

.dragon-name {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin-bottom: 5px;
}

.dragon-stage {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.dragon-level {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.dragon-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.9em;
    margin-top: 10px;
}

.dragon-stat {
    background: rgba(255, 255, 255, 0.5);
    padding: 5px;
    border-radius: 5px;
}

.dragon-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8em;
}

.dragon-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.dragon-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.9em;
}

/* 探索ゾーン */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.zone-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.zone-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.zone-card p {
    color: #666;
    margin-bottom: 15px;
}

.zone-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #555;
}

.active-explorations {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 20px;
}

.active-explorations h3 {
    color: #f5576c;
    margin-bottom: 15px;
}

.exploration-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exploration-info {
    flex: 1;
}

.exploration-dragon {
    font-weight: bold;
    color: #f5576c;
    margin-bottom: 5px;
}

.exploration-zone {
    color: #666;
    font-size: 0.9em;
}

.exploration-timer {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: bold;
}

/* クラフトセクション */
.craft-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.craft-category h3 {
    color: #f5576c;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* レシピグリッド */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.recipe-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.recipe-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.recipe-materials {
    margin-bottom: 15px;
}

.material-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: #666;
}

.material-item.insufficient {
    color: #f5576c;
}

/* インベントリ */
.inventory-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category h3 {
    color: #f5576c;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.item-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.item-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.item-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.item-count {
    color: #666;
    font-size: 0.9em;
}

/* 統計セクション */
.stats-section h2 {
    color: #f5576c;
    margin-bottom: 30px;
    font-size: 1.8em;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

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

.stat-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1em;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #f5576c;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* 空の状態 */
.empty-state {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 1.1em;
}

/* レスポンシブ */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        font-size: 0.9em;
        padding: 12px 8px;
    }

    .dragons-grid,
    .zones-grid,
    .recipes-grid,
    .items-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* アニメーション */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}
