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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 50%, #ffd1dc 100%);
    color: #4a4a4a;
    min-height: 100vh;
    overflow-x: hidden;
}

/* アプリコンテナ */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.app-header {
    background: linear-gradient(135deg, #ffb6c1, #ff69b4);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hamburger-menu {
    position: absolute;
    left: 20px;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.hamburger-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s ease;
}

.menu-overlay.active {
    display: block;
}

.menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: linear-gradient(135deg, #ffb6c1, #ff69b4);
    color: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.menu-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
    font-size: 1.1rem;
    font-weight: 500;
}

.menu-item:hover {
    background-color: rgba(255,255,255,0.2);
    text-decoration: none;
    color: white;
}

.menu-icon {
    font-size: 1.3rem;
}

.app-title {
    text-align: center;
}

.app-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* フッター */
.app-footer {
    text-align: right;
    padding: 10px 0;
    margin-top: auto;
}

.app-footer .version {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ff69b4;
    opacity: 0.8;
}

/* タイマー表示 */
.timer-display {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(255, 182, 193, 0.3);
}

.time-display {
    font-size: 4rem;
    font-weight: 300;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.3);
    color: #4a4a4a;
}

.timer-status {
    font-size: 1.2rem;
    opacity: 0.8;
    color: #666666;
}

/* コントロールボタン */
.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #da70d6, #ba55d3);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(218, 112, 214, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #ff7675, #d63031);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 118, 117, 0.4);
}

.btn-outline {
    background: transparent;
    color: #4a4a4a;
    border: 2px solid rgba(255, 105, 180, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 105, 180, 0.1);
    border-color: rgba(255, 105, 180, 0.5);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* プリセットセクション */
.preset-section {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 105, 180, 0.2);
}

/* 経過通知チェックリスト */
.interval-checklist {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 105, 180, 0.2);
    margin-bottom: 20px;
}

.interval-checklist h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #4a4a4a;
    text-align: center;
}

.interval-checklist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 105, 180, 0.2);
}

.interval-checklist-item.completed {
    background: rgba(144, 238, 144, 0.3);
    border-color: rgba(144, 238, 144, 0.5);
}

.interval-checklist-item input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
    accent-color: #ff69b4;
}

.interval-checklist-item .interval-name {
    flex: 1;
    font-weight: 500;
    color: #4a4a4a;
}

.interval-checklist-item .interval-time {
    font-size: 0.9rem;
    color: #666666;
    margin-left: 10px;
}

.preset-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #4a4a4a;
}

.preset-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.preset-item {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 105, 180, 0.2);
}

.preset-item:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.2);
}

.preset-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #4a4a4a;
}

.preset-item p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
    color: #666666;
}

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

.preset-item .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: auto;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    border: 1px solid rgba(255, 105, 180, 0.3);
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.3);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 105, 180, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #4a4a4a;
    font-size: 1.3rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a4a4a;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 105, 180, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    color: #4a4a4a;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff69b4;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
}

.form-group input::placeholder {
    color: rgba(74, 74, 74, 0.5);
}

.form-actions {
    display: flex;
    gap: 15px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 100%);
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 105, 180, 0.2);
    justify-content: flex-end;
}

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(45deg, #00b894, #00a085);
}

.notification.error {
    background: linear-gradient(45deg, #e17055, #d63031);
}

.notification.info {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
}

.notification.warning {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .app-header .version {
        font-size: 0.8rem;
    }
    
    .time-display {
        font-size: 3rem;
    }
    
    .timer-controls {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .btn {
        flex: 1;
        max-width: none;
        min-height: 44px;
        touch-action: manipulation;
        font-size: 0.9rem;
        padding: 10px 8px;
    }
    
    .preset-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: none;
        margin-bottom: 10px;
    }
    
    .modal-body {
        max-height: calc(95vh - 80px);
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .timer-display {
        padding: 30px 20px;
    }
    
    .time-display {
        font-size: 2.5rem;
    }
    
    .preset-section {
        padding: 20px;
    }
    
    .timer-controls {
        gap: 8px;
    }
    
    .timer-controls .btn {
        font-size: 0.8rem;
        padding: 8px 6px;
        min-height: 40px;
    }
    
    .form-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 50%;
        max-width: none;
        margin-bottom: 0;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

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

.timer-display.running {
    animation: pulse 2s infinite;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
} 