:root{
    --morning:#f1c40f;
    --noon:#e67e22;
    --afternoon:#3498db;
    --night:#8e44ad;

    --text:#2d3436;
}

/* =========================
   GLOBAL
========================= */
body{
    margin:0;
    padding:20px;
    display:flex;
    justify-content:center;
    background:#d9d9d9;
    font-family:"Segoe UI", Tahoma, sans-serif;
}

/* =========================
   PAPER
========================= */
.paper{
    width:660px;
    min-height:520px;
    background:#fff;
    padding:40px 30px 25px;
    box-shadow:0 8px 25px rgba(0,0,0,0.15);
    border:1px solid #cfcfcf;
    display:flex;
    flex-direction:column;
}

/* =========================
   HEADER
========================= */
.header-section{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    border-bottom:2px solid #c0392b;
    padding-bottom:12px;
    margin-bottom:18px;
}

.date-big{
    font-size:85px;
    font-weight:bold;
    color:#c0392b;
    line-height:1;
}

.date-text{
    text-align:right;
}

.month-title{
    font-size:22px;
    font-weight:bold;
    color:#c0392b;
}

.day-title{
    font-size:18px;
    color:#333;
    margin-top:5px;
}

.year-info{
    font-size:13px;
    color:#777;
}

/* =========================
   GRID
========================= */
.planner-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    border-top:1px solid #aaa;
    flex:1;
}

.column{
    border-left:1px solid #ddd;
    padding:10px;
}

.column:last-child{
    border-right:1px solid #ddd;
}

/* =========================
   PERIOD
========================= */
.period{
    text-align:center;
    font-size:14px;
    font-weight:bold;
    margin-bottom:12px;
    font-family:"Segoe Print", cursive;
    transform:rotate(-2deg);
    letter-spacing:1px;
}

/* =========================
   TASK
========================= */
.task{
    margin-bottom:16px;
    padding:6px;
    border-radius:6px;
    transition:0.2s;
    cursor:pointer;
}

.task:hover{
    background:#f5f5f5;
}

.task-line{
    display:flex;
    align-items:center;
    gap:8px;
}

.task-title{
    font-size:15px;
    font-weight:600;
    color:var(--text);
    font-family:"Segoe Print", cursive;
}

.task-time{
    font-size:12px;
    color:#555;
    margin-right:22px;
    font-family:monospace;
}

/* =========================
   CHECK BOX
========================= */
.box{
    width:16px;
    height:16px;
    border:1.5px solid #333;
    border-radius:3px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:bold;
}

/* =========================
   TASK STATUS
========================= */
.task.done .box{
    background:#2ecc71;
    border-color:#2ecc71;
    color:#fff;
}
.task.done .box::after{
    content:"✔";
}

.task.fail .box{
    background:#e74c3c;
    border-color:#e74c3c;
    color:#fff;
}
.task.fail .box::after{
    content:"✖";
}

.task.done .task-title{
    text-decoration:line-through;
    color:#888;
}

.task.fail .task-title{
    color:#e74c3c;
}

/* =========================
   ICON COLORS BY COLUMN
========================= */
.column:nth-child(1) .period,
.column:nth-child(1) .task i{color:var(--morning);}

.column:nth-child(2) .period,
.column:nth-child(2) .task i{color:var(--noon);}

.column:nth-child(3) .period,
.column:nth-child(3) .task i{color:var(--afternoon);}

.column:nth-child(4) .period,
.column:nth-child(4) .task i{color:var(--night);}

/* =========================
   NOTES
========================= */
.notes{
    margin-top:18px;
    position:relative;
}

.notes-box{
    height:140px;
    border:2px dashed #bbb;
    border-radius:10px;
    background:#fff;
}

.notes-title{
    position:absolute;
    top:-12px;
    left:50%;
    transform:translateX(-50%);
    background:#fff;
    padding:0 12px;
    font-size:16px;
    font-weight:bold;
}

/* =========================
   MENU
========================= */
#menu{
    display:none;
    position:absolute;
    background:#fff;
    border:1px solid #ccc;
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
    border-radius:6px;
}

#menu div{
    padding:8px 12px;
    cursor:pointer;
}

#menu div:hover{
    background:#eee;
}

/* =========================
   NAV BAR
========================= */
.bottom-nav{
    position:fixed;
    bottom:15px;
    left:50%;
    transform:translateX(-50%);
    width:92%;
    max-width:420px;
    height:65px;

    background:rgba(255,255,255,0.75);
    backdrop-filter:blur(12px);
    border-radius:18px;
    box-shadow:0 10px 25px rgba(0,0,0,0.15);

    display:flex;
    justify-content:space-around;
    align-items:center;
    z-index:999;
}

.nav-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    font-size:12px;
    color:#666;
    cursor:pointer;
    transition:0.3s;
}

.nav-item i{
    font-size:20px;
    margin-bottom:4px;
}

.nav-item:hover{
    color:#c0392b;
    transform:translateY(-3px);
}

.nav-item.active{
    color:#c0392b;
    font-weight:bold;
}

.nav-item.active i{
    transform:scale(1.2);
}

/* =========================
   ADD BUTTON
========================= */
.add-btn{
    position:fixed;
    bottom:95px;
    right:25px;
    width:60px;
    height:60px;
    border-radius:50%;
    background:#c0392b;
    color:#fff;
    font-size:28px;
    border:none;
    cursor:pointer;
    box-shadow:0 6px 15px rgba(0,0,0,0.3);
    transition:0.3s;
    z-index:1000;
}

.add-btn:hover{
    transform:scale(1.1) rotate(90deg);
}

/* =========================
   FORM
========================= */
.form-bg{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.4);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:999;
}

.form-box{
    background:#fff;
    padding:25px;
    border-radius:12px;
    width:320px;
    box-shadow:0 10px 25px rgba(0,0,0,0.2);
    animation:fadeIn 0.3s ease;
}

@keyframes fadeIn{
    from{transform:scale(0.8); opacity:0;}
    to{transform:scale(1); opacity:1;}
}

.form-box input,
.form-box select{
    width:100%;
    padding:10px;
    margin-bottom:10px;
    border:1px solid #ccc;
    border-radius:6px;
}

.save-btn{
    width:100%;
    padding:10px;
    border:none;
    background:#27ae60;
    color:#fff;
    border-radius:6px;
    cursor:pointer;
    font-size:15px;
}

.save-btn:hover{
    background:#219150;
}

.close-btn{
    position:absolute;
    top:10px;
    right:15px;
    font-size:18px;
    cursor:pointer;
    color:#999;
}

.close-btn:hover{
    color:#c0392b;
}

/* =========================
   WEEKEND STYLE
========================= */
.weekend{
    border-bottom:2px solid #e74c3c;
}

.weekend .date-big{
    color:#e74c3c;
}













































@media (max-width: 768px){

    /* =========================
       BODY FIX
    ========================= */
    body{
        padding:0;
        margin:0;
        background:#f2f2f2;
    }

    /* =========================
       PAPER FULL WIDTH
    ========================= */
    .paper{
        width:100% !important;
        min-height:auto;
        padding:15px 10px;
        box-shadow:none;
        border:none;
    }

    /* =========================
       HEADER MOBILE
    ========================= */
    .header-section{
        flex-direction:column;
        align-items:center;
        text-align:center;
    }

    .date-big{
        font-size:55px;
    }

    /* =========================
       GRID → COLUMN STACK (IMPORTANT)
    ========================= */
    .planner-grid{
        grid-template-columns:1fr !important;
        display:grid;
        gap:12px;
    }

    .column{
        border:1px solid #ddd;
        border-radius:10px;
        padding:10px;
        background:#fff;
    }

    /* =========================
       TASK TEXT SMALLER
    ========================= */
    .task-title{
        font-size:13px;
    }

    .task-time{
        font-size:11px;
    }

    /* =========================
       NOTES
    ========================= */
    .notes-box{
        height:100px;
    }

    /* =========================
       NAV FIX
    ========================= */
    .bottom-nav{
        width:95%;
        height:60px;
    }

    /* =========================
       ADD BUTTON
    ========================= */
    .add-btn{
        width:55px;
        height:55px;
        font-size:24px;
        bottom:80px;
        right:15px;
    }

    /* =========================
       FORM MOBILE
    ========================= */
    .form-box{
        width:90%;
    }
}