body{
    font-family:'Segoe UI',Tahoma,sans-serif;
    background:#eef2f7;
    margin:0;
    padding:30px;
}

.container{
    width:70%;
    max-width:900px;
    margin:auto;
    background:white;
    padding:20px;
    border-radius:12px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

.header{
    background:linear-gradient(
        135deg,
        #0f2d5c,
        #1f4b99
    );
    padding:30px;
    border-radius:12px;
    margin-bottom:25px;
}

.header h1{
    margin:0;
    color:#ffffff !important;
    font-size:38px;
    font-weight:700;
}

.header p{
    color:#ffffff !important;
    margin-top:10px;
    margin-bottom:0;
    font-size:18px;
    opacity:0.9;
}

h1{
    margin-top:0;
    font-size:34px;
}

h2{
    color:#0f2d5c;
    border-left:6px solid #0f2d5c;
    padding-left:12px;
}

p{
    color:#666;
}

hr{
    border:none;
    border-top:1px solid #dbe3ee;
    margin:35px 0;
}

.section-card{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:20px;
    margin-bottom:25px;
}

canvas{
    border:2px solid #d9e2ef;
    border-radius:10px;
    background:white;
    width:700px !important;
    height:auto !important;
    max-width:100%;
}

#frontSourceCanvas,
#backSourceCanvas{
    width:700px;
    height:auto;
}

#frontResultCanvas,
#backResultCanvas{
    width:700px;
    height:auto;
}

#a4Canvas{
    width:500px;
    height:auto;
    border:3px solid #0f2d5c;
}

button{
    background:#0f2d5c;
    color:white;
    border:none;
    border-radius:8px;
    padding:12px 20px;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    transition:0.2s;
    margin-right:10px;
    margin-bottom:10px;
}

button:hover{
    background:#174080;
}

button:active{
    transform:scale(0.98);
}

#generateBtn{
    background:#16a34a;
}

#generateBtn:hover{
    background:#15803d;
}

#downloadBtn{
    background:#ea580c;
}

#downloadBtn:hover{
    background:#c2410c;
}

input[type="file"]{
    padding:10px;
    background:#f7f9fc;
    border:1px solid #d9e2ef;
    border-radius:8px;
}

.status{
    font-weight:bold;
    margin-left:15px;
}

.status.success{
    color:#16a34a;
}

.status.error{
    color:#dc2626;
}

.opencv-status{
    display:inline-block;
    margin-top:15px;
    padding:8px 15px;
    background:#ecfdf3;
    color:#16a34a;
    border-radius:8px;
    font-weight:bold;
}

.footer{
    margin-top:40px;
    padding:25px;
    text-align:center;
    background:#0f2d5c;
    color:white;
    border-radius:12px;
    font-size:13px;
    line-height:1.8;
}

.footer p{
    color:white;
    margin:0;
}