/* Todo Board Page Styles - 카드보드 느낌 */

:root {
    --todo-primary: #8B4513;
    --todo-secondary: #D2691E;
    --todo-accent: #FFD700;
    --todo-board: #DEB887;
    --todo-paper: #FFFEF0;
    --todo-dark: #4A3728;
    --todo-check: #2E7D32;
    --todo-delete: #C62828;
    --cork-bg: #C4A574;
    --card-shadow: 0 8px 32px rgba(74, 55, 40, 0.3);
}

/* Header - 코르크보드 스타일 */
.todo-header {
    background: linear-gradient(145deg, #D4A574 0%, #C4956A 50%, #B8895E 100%);
    border-radius: 20px;
    padding: 50px 30px 40px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 
        var(--card-shadow),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    border: 4px solid #8B7355;
    overflow: hidden;
}

.todo-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 90, 43, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(139, 90, 43, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(139, 90, 43, 0.25) 1px, transparent 1px);
    background-size: 15px 15px, 20px 20px, 25px 25px;
    opacity: 0.5;
}

.header-decoration {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 2;
}

.pin {
    font-size: 1.8rem;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
    animation: pin-wobble 3s ease-in-out infinite;
}

.pin-right {
    animation-delay: 1.5s;
}

@keyframes pin-wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.todo-title {
    color: var(--todo-dark);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.3);
}

.title-icon {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.title-icon:last-child {
    animation-delay: 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.todo-subtitle {
    color: rgba(74, 55, 40, 0.8);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.today-date-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--todo-paper);
    padding: 12px 25px;
    border-radius: 10px;
    box-shadow: 
        3px 3px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid var(--todo-dark);
    transform: rotate(-1deg);
}

.date-icon {
    font-size: 1.2rem;
}

.today-date {
    color: var(--todo-dark);
    font-weight: 700;
    font-size: 1rem;
}

/* Todo Board - 메모장 스타일 */
.todo-board {
    background: var(--todo-paper);
    border-radius: 5px;
    padding: 35px 30px;
    margin-bottom: 30px;
    box-shadow: 
        var(--card-shadow),
        5px 5px 0 rgba(0, 0, 0, 0.1);
    border: 2px solid #E8DCC8;
    position: relative;
}

.todo-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #FFB6B6 0%, #FF9999 100%);
    opacity: 0.6;
}

.todo-board::after {
    content: '';
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: calc(100% - 120px);
    background: repeating-linear-gradient(
        transparent,
        transparent 31px,
        #E8E8E8 31px,
        #E8E8E8 32px
    );
    pointer-events: none;
}

/* Progress Section */
.progress-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF5D6 100%);
    border-radius: 12px;
    border: 2px dashed var(--todo-secondary);
    position: relative;
    z-index: 1;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 100px;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--todo-dark);
    font-weight: 600;
}

.progress-count {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--todo-secondary);
}

.progress-bar-container {
    flex: 1;
    height: 20px;
    background: #E8DCC8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    border-radius: 10px 10px 0 0;
}

.progress-percent {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--todo-check);
    min-width: 50px;
    text-align: right;
}

/* Input Section */
.todo-input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 1.2rem;
    z-index: 1;
}

.todo-input {
    width: 100%;
    padding: 16px 80px 16px 45px;
    border: 3px solid var(--todo-board);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.todo-input:focus {
    outline: none;
    border-color: var(--todo-secondary);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        0 0 0 4px rgba(210, 105, 30, 0.15);
}

.todo-input::placeholder {
    color: #B8A88A;
}

.char-count {
    position: absolute;
    right: 15px;
    font-size: 0.8rem;
    color: #B8A88A;
}

.add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 25px;
    background: linear-gradient(135deg, #8B6914 0%, #6B5210 100%);
    color: #FFF5D6;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 82, 16, 0.3);
    white-space: nowrap;
}

.add-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #9B7916 0%, #7B6212 100%);
    box-shadow: 0 6px 20px rgba(107, 82, 16, 0.4);
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Remaining Info */
.remaining-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.remaining-icon {
    font-size: 1.1rem;
}

.remaining-text {
    font-size: 0.9rem;
    color: var(--todo-dark);
}

.remaining-text strong {
    color: var(--todo-secondary);
    font-size: 1.1rem;
}

/* Todo List */
.todo-list-container {
    min-height: 200px;
    position: relative;
    z-index: 1;
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Todo Item - 포스트잇 스타일 */
.todo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #FFFACD 0%, #FFF8DC 100%);
    border-radius: 5px;
    box-shadow: 
        3px 3px 8px rgba(0, 0, 0, 0.15),
        -1px -1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    position: relative;
    border-left: 4px solid var(--todo-secondary);
}

.todo-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent #E8DCC8 transparent transparent;
}

.todo-item:hover {
    transform: translateX(5px) rotate(0.5deg);
    box-shadow: 
        5px 5px 15px rgba(0, 0, 0, 0.2),
        -1px -1px 0 rgba(255, 255, 255, 0.5);
}

.todo-item.completed {
    background: linear-gradient(135deg, #E8E8E8 0%, #F0F0F0 100%);
    border-left-color: var(--todo-check);
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #999;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px) rotate(-2deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

/* Checkbox - 커스텀 스타일 */
.todo-checkbox {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.todo-checkbox input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.checkbox-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    background: white;
    border: 3px solid var(--todo-board);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.todo-checkbox input:checked + .checkbox-custom {
    background: var(--todo-check);
    border-color: var(--todo-check);
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.todo-checkbox input:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Todo Text */
.todo-text {
    flex: 1;
    font-size: 1.05rem;
    color: var(--todo-dark);
    line-height: 1.4;
    word-break: break-word;
    transition: all 0.3s ease;
}

/* Delete Button */
.delete-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(198, 40, 40, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--todo-delete);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.delete-btn:hover {
    background: var(--todo-delete);
    color: white;
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    display: none;
}

.empty-state.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--todo-dark);
    margin-bottom: 8px;
}

.empty-subtitle {
    color: #999;
    font-size: 1rem;
}

/* Actions */
.todo-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #E8DCC8;
    position: relative;
    z-index: 1;
}

.clear-completed-btn,
.clear-all-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.clear-completed-btn {
    background: white;
    border-color: var(--todo-secondary);
    color: var(--todo-secondary);
}

.clear-completed-btn:hover {
    background: var(--todo-secondary);
    color: white;
}

.clear-all-btn {
    background: white;
    border-color: var(--todo-delete);
    color: var(--todo-delete);
}

.clear-all-btn:hover {
    background: var(--todo-delete);
    color: white;
}

/* Tips Section */
.tips-section {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #90CAF9;
}

.tips-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1565C0;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.tips-content {
    color: #1976D2;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Quote Section */
.quote-section {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD9 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #F48FB1;
}

.quote-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.quote-text {
    font-size: 1.15rem;
    font-style: italic;
    color: #AD1457;
    line-height: 1.7;
    margin-bottom: 20px;
}

.new-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #EC407A;
    border-radius: 25px;
    color: #EC407A;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-quote-btn:hover {
    background: #EC407A;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .todo-header {
        padding: 40px 20px 30px;
        border-radius: 15px;
    }

    .todo-title {
        font-size: 1.8rem;
    }

    .todo-board {
        padding: 25px 20px;
    }

    .todo-board::before {
        left: 25px;
    }

    .progress-section {
        flex-wrap: wrap;
        gap: 10px;
    }

    .progress-info {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .progress-bar-container {
        order: 1;
        width: 100%;
    }

    .progress-percent {
        order: 2;
        min-width: auto;
    }

    .todo-input-section {
        flex-direction: column;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }

    .todo-item {
        padding: 15px;
    }

    .todo-text {
        font-size: 0.95rem;
    }

    .todo-actions {
        flex-direction: column;
        align-items: center;
    }

    .clear-completed-btn,
    .clear-all-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-decoration {
        padding: 0 15px;
    }

    .pin {
        font-size: 1.4rem;
    }

    .todo-title {
        font-size: 1.5rem;
    }

    .today-date-box {
        padding: 10px 18px;
    }

    .todo-board::before {
        display: none;
    }

    .todo-board::after {
        display: none;
    }

    .todo-input {
        padding: 14px 70px 14px 40px;
        font-size: 0.95rem;
    }

    .input-icon {
        font-size: 1rem;
        left: 12px;
    }

    .char-count {
        font-size: 0.75rem;
        right: 10px;
    }

    .todo-checkbox {
        width: 24px;
        height: 24px;
    }

    .checkbox-custom {
        width: 24px;
        height: 24px;
    }

    .delete-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .tips-section,
    .quote-section {
        padding: 20px;
    }

    .quote-text {
        font-size: 1rem;
    }
}

/* 삭제 애니메이션 */
.todo-item.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(30px) rotate(2deg);
        height: 0;
        padding: 0;
        margin: 0;
    }
}

