/* モダンモバイルアプリUI - 先進的ダークテーマ */

.modern-mobile-app {
    background: linear-gradient(135deg, #1C1C28 0%, #2D3E50 50%, #34495E 100%);
    border-radius: 24px;
    padding: 6px;
    box-shadow: 
        0 25px 50px rgba(28, 28, 40, 0.4),
        0 12px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(58, 141, 255, 0.1);
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(10deg);
    transition: all 0.3s ease;
    border: 1px solid rgba(58, 141, 255, 0.2);
}

.modern-mobile-app:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(5deg) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(28, 28, 40, 0.5),
        0 15px 30px rgba(58, 141, 255, 0.2),
        inset 0 1px 0 rgba(58, 141, 255, 0.15);
}

.app-screen {
    background: #2D3E50;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 1px 0 rgba(58, 141, 255, 0.3),
        inset 0 -1px 0 rgba(28, 28, 40, 0.5);
}

/* ステータスバー */
.status-bar {
    background: linear-gradient(180deg, #1C1C28 0%, #2D3E50 100%);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #DDEAF7;
    border-bottom: 1px solid rgba(58, 141, 255, 0.15);
}

.signal-dots {
    display: flex;
    gap: 2px;
}

.signal-dot {
    width: 4px;
    height: 4px;
    background: #3A8DFF;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 4px rgba(58, 141, 255, 0.5);
}

.signal-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.signal-dot:nth-child(3) {
    animation-delay: 0.6s;
}

/* アプリヘッダー */
.app-header {
    background: linear-gradient(135deg, #1C1C28 0%, #3A8DFF 50%, #2D3E50 100%);
    padding: 16px;
    color: white;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(58, 141, 255, 0.3);
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(58, 141, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(221, 234, 247, 0.05) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="8" height="8" patternUnits="userSpaceOnUse"><path d="M 8 0 L 0 0 0 8" fill="none" stroke="rgba(58,141,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.app-header-content {
    position: relative;
    z-index: 1;
}

.app-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(58, 141, 255, 0.4);
    color: #DDEAF7;
}

.app-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 4px 0 0 0;
    font-weight: 500;
    color: #DDEAF7;
}

/* タスクカード */
.task-card {
    background: linear-gradient(135deg, #2D3E50 0%, #34495E 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    box-shadow: 
        0 4px 12px rgba(28, 28, 40, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(58, 141, 255, 0.1);
    border: 1px solid rgba(58, 141, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card.completed::before {
    opacity: 1;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

.task-card.green {
    --accent-color: #3A8DFF;
    background: linear-gradient(135deg, #2D3E50 0%, #27AE60 15%, #34495E 100%);
    border-color: rgba(58, 141, 255, 0.3);
}

.task-card.blue {
    --accent-color: #3A8DFF;
    background: linear-gradient(135deg, #2D3E50 0%, #3A8DFF 15%, #34495E 100%);
    border-color: rgba(58, 141, 255, 0.4);
}

.task-card.orange {
    --accent-color: #E67E22;
    background: linear-gradient(135deg, #2D3E50 0%, #E67E22 15%, #34495E 100%);
    border-color: rgba(230, 126, 34, 0.3);
}

/* タスクアイコン */
.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #DDEAF7;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(221, 234, 247, 0.2);
}

.task-icon.green {
    background: linear-gradient(135deg, #3A8DFF 0%, #27AE60 100%);
    box-shadow: 0 4px 12px rgba(58, 141, 255, 0.4);
}

.task-icon.blue {
    background: linear-gradient(135deg, #3A8DFF 0%, #5DADE2 100%);
    box-shadow: 0 4px 12px rgba(58, 141, 255, 0.5);
}

.task-icon.orange {
    background: linear-gradient(135deg, #3A8DFF 0%, #E67E22 100%);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.task-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
}

/* チェックマークアニメーション */
.check-mark {
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.check-mark.animate {
    opacity: 1;
    transform: scale(1);
}

.check-mark.animate::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ripple 0.6s ease-out;
}

/* タスクテキスト */
.task-content {
    flex: 1;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: #DDEAF7;
    margin: 0 0 4px 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.task-subtitle {
    font-size: 12px;
    color: rgba(221, 234, 247, 0.7);
    margin: 0;
    font-weight: 500;
}

/* 進捗セクション */
.progress-section {
    background: linear-gradient(135deg, #1C1C28 0%, #2D3E50 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 16px;
    border: 1px solid rgba(58, 141, 255, 0.2);
    box-shadow: 
        inset 0 1px 0 rgba(58, 141, 255, 0.1),
        0 4px 12px rgba(28, 28, 40, 0.3);
}

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

.progress-label {
    font-size: 14px;
    font-weight: 600;
    color: #DDEAF7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-value {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #3A8DFF 0%, #27AE60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 8px rgba(58, 141, 255, 0.5);
    position: relative;
    filter: drop-shadow(0 0 4px rgba(58, 141, 255, 0.3));
}

/* 進捗バー */
.progress-bar-container {
    background: #1C1C28;
    border-radius: 8px;
    height: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -1px 0 rgba(58, 141, 255, 0.1);
    border: 1px solid rgba(58, 141, 255, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3A8DFF 0%, #27AE60 50%, #5DADE2 100%);
    border-radius: 8px;
    position: relative;
    width: 0%;
    transition: width 2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        0 0 8px rgba(58, 141, 255, 0.5),
        inset 0 1px 0 rgba(221, 234, 247, 0.2);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

.progress-bar.animate {
    width: 85%;
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: rgba(221, 234, 247, 0.7);
    font-weight: 500;
}

/* アニメーション定義 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modern-mobile-app {
        transform: perspective(800px) rotateY(-3deg) rotateX(5deg);
    }
    
    .task-card {
        padding: 12px;
        margin: 6px 0;
    }
    
    .task-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .progress-section {
        padding: 12px;
        margin: 12px;
    }
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .modern-mobile-app {
        transform: none;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .app-screen {
        background: #1a1a1a;
    }
    
    .task-card {
        background: #2d2d2d;
        border-color: rgba(255, 255, 255, 0.1);
        color: #e9ecef;
    }
    
    .task-title {
        color: #f8f9fa;
    }
    
    .task-subtitle {
        color: #adb5bd;
    }
    
    .progress-section {
        background: #343a40;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .progress-label {
        color: #f8f9fa;
    }
}