/* ==========================================
   OfficeMitra - Rotate PDF
   Version 1.0
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,Helvetica,sans-serif;
}

body{
    background:#f4f7fb;
    color:#333;
}

/* Header */

header{
    background:#0d6efd;
    color:#fff;
    text-align:center;
    padding:30px 20px;
}

header h1{
    font-size:34px;
    margin-bottom:10px;
}

header p{
    font-size:16px;
    opacity:.9;
}

/* Container */

.container{
    max-width:1200px;
    margin:40px auto;
    padding:20px;
}

/* Upload Box */

.upload-box{
    background:#fff;
    border:3px dashed #0d6efd;
    border-radius:12px;
    padding:50px 20px;
    text-align:center;
    cursor:pointer;
    transition:.3s;
}

.upload-box:hover{
    background:#eef5ff;
}

.upload-box button{
    background:#0d6efd;
    color:#fff;
    border:none;
    padding:14px 30px;
    border-radius:8px;
    font-size:16px;
    cursor:pointer;
    transition:.3s;
}

.upload-box button:hover{
    background:#0b5ed7;
}

.upload-box p{
    margin-top:15px;
    color:#666;
}

/* Info Box */

.info-box{
    margin-top:30px;
    background:#fff;
    padding:25px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.info-box h2{
    margin-bottom:20px;
}

.info-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
}

.info-grid div{
    background:#f8f9fa;
    padding:15px;
    border-radius:8px;
}

/* Toolbar */

.toolbar{
    margin-top:30px;
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    justify-content:center;
}

.toolbar button{
    padding:12px 22px;
    border:none;
    border-radius:8px;
    color:#fff;
    font-size:15px;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
}

/* Toolbar Colors */

#selectAllBtn{
    background:#6c757d;
}

#rotateLeftSelected{
    background:#fd7e14;
}

#rotateRightSelected{
    background:#0d6efd;
}

#rotate180Selected{
    background:#6f42c1;
}

#resetSelected{
    background:#dc3545;
}

.toolbar button:hover{
    transform:translateY(-2px);
    opacity:.9;
}

/* Preview */

#previewContainer{
    margin-top:40px;
}

#previewContainer h2{
    margin-bottom:20px;
}

#pageGrid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
    gap:25px;
}

/* Page Card */

.page-card{
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 4px 10px rgba(0,0,0,.12);
    transition:.3s;
}

.page-card:hover{
    transform:translateY(-5px);
}

.page-card canvas{
    width:100%;
    display:block;
    background:#fff;
}

/* Card Body */

.card-body{
    padding:15px;
}

.card-body h3{
    text-align:center;
    margin-bottom:12px;
}

/* Checkbox */

.page-select{
    display:flex;
    justify-content:center;
    margin-bottom:12px;
}

.page-select input{
    transform:scale(1.3);
    cursor:pointer;
}

/* Rotation Info */

.rotation-label{
    text-align:center;
    font-weight:bold;
    color:#0d6efd;
    margin-bottom:12px;
}

/* Page Buttons */

.page-buttons{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
}

.page-buttons button{
    border:none;
    border-radius:6px;
    padding:10px;
    color:#fff;
    cursor:pointer;
    font-size:14px;
    transition:.3s;
}

.rotate-left{
    background:#fd7e14;
}

.rotate-right{
    background:#0d6efd;
}

.rotate-180{
    background:#6f42c1;
}

.reset-page{
    background:#dc3545;
}

.page-buttons button:hover{
    opacity:.9;
}

/* Bottom Buttons */

.bottom-action{
    margin-top:40px;
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:20px;
}

.bottom-action button{
    min-width:250px;
    border:none;
    border-radius:8px;
    padding:15px 25px;
    color:#fff;
    font-size:18px;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
}

#fixOrientationBtn{
    background:#20c997;
}

#downloadBtn{
    background:#198754;
}

.bottom-action button:hover{
    transform:translateY(-2px);
}

/* Status */

#status{
    margin-top:25px;
    text-align:center;
    font-size:18px;
    font-weight:bold;
    color:#0d6efd;
}

/* Footer */

footer{
    margin-top:60px;
    padding:20px;
    background:#fff;
    border-top:1px solid #ddd;
    text-align:center;
    color:#666;
}

/* Responsive */

@media(max-width:768px){

    header h1{
        font-size:28px;
    }

    .info-grid{
        grid-template-columns:1fr;
    }

    .toolbar{
        flex-direction:column;
    }

    .toolbar button{
        width:100%;
    }

    #pageGrid{
        grid-template-columns:1fr;
    }

    .page-buttons{
        grid-template-columns:1fr 1fr;
    }

    .bottom-action{
        flex-direction:column;
    }

    .bottom-action button{
        width:100%;
    }

}