/* 全体スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Mochiy Pop One', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333333;
    line-height: 1.6;
}

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

/* ヘッダー */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.subtitle {
    font-size: 1.2rem;
    color: #666666;
    font-weight: 400;
}

/* メインコンテンツ */
.main-content {
    display: grid;
    gap: 2rem;
}

/* セクションタイトル */
.section-title {
    font-size: 1.5rem;
    color: #4a90e2;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* パラメーターセクション */
.parameters-section {
    background: #ffffff;
    border: 2px solid #e8f4f8;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.level-display {
    text-align: center;
    margin-bottom: 2rem;
}

.level-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.level-label {
    font-size: 1.2rem;
    color: #666666;
    font-weight: 700;
}

.level-number {
    font-size: 2rem;
    font-weight: 700;
    color: #4a90e2;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.exp-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 30px;
    background: #f5f5f5;
    border-radius: 15px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #7bb3f0);
    border-radius: 15px;
    transition: width 0.5s ease;
    box-shadow: none;
}

.exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333333;
    font-weight: 700;
    font-size: 0.9rem;
}

/* パラメーターグリッド */
.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.parameter-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.parameter-menu {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    cursor: default;
}

.menu-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    color: #666666;
    transition: background-color 0.2s ease;
}

.menu-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.menu-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333333;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item.delete {
    color: #dc3545;
}

.menu-item.delete:hover {
    background-color: #f8d7da;
}

.parameter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.parameter-icon {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.parameter-name {
    font-size: 0.9rem;
    color: #333333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.parameter-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.param-level {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4a90e2;
}

.param-exp-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.param-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #7bb3f0);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* タスク入力セクション */
.task-input-section {
    background: #ffffff;
    border: 2px solid #e8f4f8;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.task-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.task-input {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    transition: all 0.3s ease;
}

.task-input:focus {
    outline: none;
    border-color: #4a90e2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.task-input::placeholder {
    color: #999999;
}

.task-type-select {
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-type-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.add-button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: #4a90e2;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.add-button:active {
    transform: scale(0.95);
}

/* タスクリストセクション */
.task-list-section {
    background: #ffffff;
    border: 2px solid #e8f4f8;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.task-list {
    display: grid;
    gap: 1rem;
}

.task-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

.task-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.task-icon {
    font-size: 1.5rem;
    min-width: 30px;
}

.task-content {
    flex: 1;
}

.task-name {
    font-size: 1.1rem;
    color: #333333;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.task-type {
    font-size: 0.9rem;
    color: #666666;
    background: #e9ecef;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    display: inline-block;
}

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

.complete-button, .delete-button {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
}

.complete-button {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.complete-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.delete-button {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.delete-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* 空状態 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999999;
}

.empty-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

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

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

.modal-content {
    background: #ffffff;
    border: 2px solid #e8f4f8;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.5s ease;
}

.modal-title {
    font-size: 2rem;
    color: #4a90e2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.level-up-message {
    font-size: 1.2rem;
    color: #333333;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.level-up-stats {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    background: #4a90e2;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.modal-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.level-up-animation {
    animation: pulse 0.6s ease-in-out;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333333;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666666;
    font-size: 0.8rem;
}

.parameter-icon img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.cancel-button {
    background: #6c757d !important;
}

.add-parameter-card {
    background: #e8f4f8 !important;
    border: 2px dashed #4a90e2 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-parameter-card:hover {
    background: #d1e7f0 !important;
    transform: translateY(-2px);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .parameters-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-input {
        min-width: auto;
    }
    
    .task-item {
        flex-direction: column;
        text-align: center;
    }
    
    .task-actions {
        justify-content: center;
        width: 100%;
    }
}
