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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    z-index: 1000;
}

.add-task-form {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    border: 2px solid #ff6b35;
}

#task-input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 300px;
    border: 1px solid #ff6b35;
}

#task-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#due-date-input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid #ff6b35;
}

#add-btn {
    padding: 10px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#add-btn:hover {
    background: #e55a2b;
}

.task-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.task-item {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(255, 107, 53, 0.7));
    border: 2px solid #ff6b35;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 150px;
    max-width: 300px;
    word-wrap: break-word;
}

.task-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
}

.task-item.urgent {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.9), rgba(255, 0, 0, 0.7));
    border-color: #ff0000;
    animation: pulse 2s infinite;
}

.task-item.overdue {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(139, 0, 0, 0.7));
    border-color: #8b0000;
    animation: urgent-pulse 1s infinite;
}

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

@keyframes urgent-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
    }
}

.task-due-date {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

/* 居合斬りエフェクト */
.slash-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10000;
}

.slash-effect.hidden {
    display: none;
}

.slash-line {
    position: absolute;
    width: 2px;
    height: 120%;
    background: linear-gradient(to bottom, transparent, #ffffff, #ff6b35, #ffffff, transparent);
    transform-origin: center;
    opacity: 0;
}

.slash-line.animate {
    animation: slash 0.5s ease-out;
}

@keyframes slash {
    0% {
        opacity: 0;
        transform: scaleY(0) rotate(45deg);
    }
    20% {
        opacity: 1;
        transform: scaleY(1) rotate(45deg);
    }
    100% {
        opacity: 0;
        transform: scaleY(1) rotate(45deg);
    }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff6b35;
    border-radius: 50%;
    opacity: 0;
}

.particle.animate {
    animation: particleExplosion 0.8s ease-out;
}

@keyframes particleExplosion {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--random-x), var(--random-y));
    }
}

/* タスクが完了する時のフェードアウト */
.task-item.completing {
    animation: taskComplete 0.5s ease-out forwards;
}

@keyframes taskComplete {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}