/* ===========================
   AFLAK v2
   style.css
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
}

body{

    background:
    linear-gradient(
        rgba(106,17,203,.85),
        rgba(37,117,252,.85)
    ),
    url("background.png");

    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    background-attachment:fixed;

    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    padding:20px;

    color:#333;
}

/* ===========================
   Main Container - Smaller & Centered
=========================== */

.container{

    width:100%;
    max-width:700px;

    background:rgba(255,255,255,.95);

    border-radius:16px;

    overflow:hidden;

    backdrop-filter:blur(6px);

    box-shadow:
    0 10px 30px rgba(0,0,0,.30);

}

.header{

    background:
    linear-gradient(
        135deg,
        #6a11cb,
        #2575fc
    );

    color:white;

    padding:18px 20px;

    text-align:center;

}

.header h1{

    font-size:24px;

    margin-bottom:4px;

}

.header p{

    opacity:.90;

    font-size:13px;

}

.content{

    padding:18px 20px 20px 20px;

}

.message{

    margin-bottom:15px;

    padding:10px;

    border-radius:8px;

    text-align:center;

}

.hidden{

    display:none;

}

/*=============================
        File Cards - Side by Side
=============================*/

#files-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.download-card{

    background:#f8f9fa;

    border-top:4px solid #6a11cb;

    border-radius:10px;

    padding:14px 14px 16px 14px;

    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);

    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 190px;
}

.download-card:hover{

    transform:translateY(-4px);

    box-shadow:
    0 10px 22px rgba(106,17,203,.18);
    
    border-top-color: #2575fc;
}

.file-header{

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:10px;
}

.file-icon{

    width:40px;

    height:40px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    background:
    linear-gradient(
        135deg,
        #6a11cb,
        #2575fc
    );

    color:white;

    font-size:18px;

    flex-shrink:0;
}

.file-title{

    flex:1;
    min-width:0;
}

.file-name{

    font-size:14px;

    color:#333;

    margin-bottom:3px;

    word-break:break-all;
    
    line-height:1.2;
}

.file-type{

    display:inline-block;

    background:#e7e7e7;

    color:#555;

    padding:2px 8px;

    border-radius:20px;

    font-size:10px;

    font-weight:600;
}

/*=============================
        File Information
=============================*/

.file-info{

    border-top:1px solid #e5e5e5;

    padding-top:8px;

    margin-top:auto;
    margin-bottom:10px;

    flex:1;
}

.info-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:4px 0;

    border-bottom:1px dashed #eee;
    
    font-size:12px;
}

.info-row:last-child{

    border-bottom:none;

}

.label{

    color:#888;

    font-weight:500;
    font-size:11px;
}

.modified{

    color:#2575fc;

    font-weight:600;

    direction:ltr;
    font-size:11px;
}

.size{

    color:#28a745;

    font-weight:bold;
    
    font-size:12px;
}

/*=============================
        Download Button
=============================*/

.download-btn{

    display:block;

    width:100%;

    text-align:center;

    text-decoration:none;

    padding:9px 12px;

    border-radius:8px;

    color:#fff;

    font-size:13px;

    font-weight:600;

    cursor:pointer;

    transition: all .3s ease;

    background:
    linear-gradient(
        135deg,
        #6a11cb,
        #2575fc
    );
    
    border: none;
    margin-top: auto;
}

.download-btn:hover{

    transform:translateY(-2px);

    box-shadow:
    0 6px 16px
    rgba(106,17,203,.28);

}


/*=============================
        Status Badge
=============================*/

.badge{

    display:inline-block;

    padding:2px 8px;

    border-radius:20px;

    font-size:9px;

    color:#fff;

    margin-top:4px;
    
    font-weight:600;
}

.badge-new{

    background:#28a745;

}

.badge-week{

    background:#ff9800;

}

.badge-old{

    background:#999;

}


/*=============================
        Empty State
=============================*/

.empty{

    text-align:center;

    padding:30px 15px;

    color:#777;
    
    grid-column: 1 / -1;
}

.empty h3{

    margin-bottom:8px;
    font-size:16px;
}

.empty p{

    line-height:1.6;
    font-size:13px;
}

/*==================================
    Animations
==================================*/

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(12px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

.download-card{

    animation:fadeIn .35s ease forwards;
}

.download-card:nth-child(1) { animation-delay: 0.05s; }
.download-card:nth-child(2) { animation-delay: 0.10s; }
.download-card:nth-child(3) { animation-delay: 0.15s; }
.download-card:nth-child(4) { animation-delay: 0.20s; }

/*==================================
    Scrollbar
==================================*/

::-webkit-scrollbar{

    width:6px;

}

::-webkit-scrollbar-track{

    background:#ececec;

}

::-webkit-scrollbar-thumb{

    background:#6a11cb;

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:#2575fc;

}

/*==================================
    Responsive
==================================*/

@media (max-width:768px){

    body{

        padding:15px;

        background-attachment:scroll;

    }

    .container{

        max-width:100%;

    }

    .header{

        padding:14px 16px;

    }

    .header h1{

        font-size:20px;

    }
    
    .header p {
        font-size:12px;
    }

    .content{

        padding:14px 16px 16px 16px;

    }

    .download-card{

        padding:12px;
        min-height:170px;

    }

    .file-header{

        gap:8px;

    }

    .file-icon{

        width:34px;
        height:34px;
        font-size:15px;

    }

    .file-name{

        font-size:13px;

    }
    
    #files-container {
        gap:12px;
    }
    
    .info-row {
        font-size:11px;
        padding:3px 0;
    }
    
    .download-btn {
        font-size:12px;
        padding:8px 10px;
    }

}

@media (max-width:550px){
    
    #files-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .download-card {
        min-height: 160px;
        padding:10px;
    }
    
    .file-name {
        font-size:12px;
    }
    
    .file-icon {
        width:30px;
        height:30px;
        font-size:14px;
    }
    
    .file-type {
        font-size:9px;
        padding:1px 6px;
    }
    
    .info-row {
        font-size:10px;
        padding:2px 0;
    }
    
    .label {
        font-size:9px;
    }
    
    .modified {
        font-size:10px;
    }
    
    .size {
        font-size:10px;
    }
    
    .download-btn {
        font-size:11px;
        padding:7px 8px;
    }
    
    .badge {
        font-size:8px;
        padding:1px 6px;
    }
}

@media (max-width:400px){
    
    #files-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .container {
        max-width:100%;
    }
}

/*==================================
    Print
==================================*/

@media print{

    body{

        background:#ffffff;

    }

    .container{

        box-shadow:none;

        border:1px solid #ccc;

    }

    .download-btn{

        display:none;

    }
    
    #files-container {
        display: block;
    }
    
    .download-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border:1px solid #ddd;
        margin-bottom:12px;
    }

}