/* style.css - KAZU_CTRL 共通スタイル・アニメーション */

:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto Mono', 'SF Mono', monospace;
    background: #020617;
    color: #e2e8f0;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Breathing Animation (Tide) */
@keyframes breathe {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.15;
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    }
}

/* Spring Animation (M3) */
@keyframes spring-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spring-out {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
}

@keyframes slide-up {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes confetti {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(360deg);
        opacity: 0;
    }
}

/* Utility Classes */
.animate-slide-up {
    animation: slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-spring-in {
    animation: spring-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Navigation Buttons */
.nav-btn {
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

/* Filter Chips */
.filter-chip {
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-chip.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

/* Task Item */
.task-item {
    animation: spring-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #64748b;
}

/* Checkbox */
.task-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.task-checkbox:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.1);
}

.task-checkbox:checked {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-color: #3b82f6;
}

.task-checkbox:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    font-family: 'SF Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.MATH {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.category-badge.BIZ {
    background: rgba(249, 115, 22, 0.2);
    color: #fed7aa;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.category-badge.CERT {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Input Fields */
input[type="text"],
input[type="number"],
input[type="password"],
select {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Buttons */
button {
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    outline: none;
}

button:active {
    transform: scale(0.95);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Modal */
#taskModal {
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Light Theme */
body.light-theme {
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .glass-card {
    background: rgba(248, 250, 252, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

body.light-theme input[type="text"],
body.light-theme input[type="number"],
body.light-theme input[type="password"],
body.light-theme select {
    background: rgba(255, 255, 255, 0.7);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme input::placeholder {
    color: #94a3b8;
}

body.light-theme .nav-btn {
    color: #64748b;
}

body.light-theme .nav-btn.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 640px) {
    .glass-card {
        padding: 1rem;
    }

    button {
        font-size: 14px;
    }

    .nav-btn {
        padding: 0.5rem;
    }

    .nav-btn span:first-child {
        font-size: 1.25rem;
    }

    .nav-btn span:last-child {
        font-size: 0.75rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
