/*=================================================
SIGNATURE TOOL PRO V2
=================================================*/

:root{

    --primary:#0f766e;
    --primary-dark:#0b5e59;

    --blue:#2563eb;

    --green:#16a34a;

    --danger:#dc2626;

    --text:#1f2937;

    --light:#6b7280;

    --border:#e5e7eb;

    --card:#ffffff;

    --bg:#f5f7fb;

    --radius:16px;

    --shadow:0 10px 30px rgba(0,0,0,.08);

}

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

body{

    font-family:Inter,Arial,sans-serif;

    background:var(--bg);

    color:var(--text);

}

img{

    max-width:100%;

    display:block;

}

button{

    cursor:pointer;

    font-family:inherit;

}

input,
select{

    font-family:inherit;

}

.st-hidden{

    display:none !important;

}

/*=================================================
APP
=================================================*/

.st-app{

    width:100%;

    max-width:1400px;

    margin:30px auto;

    padding:0 15px;

}

.st-header{

    text-align:center;

    margin-bottom:25px;

}

.st-header h1{

    font-size:42px;

    font-weight:700;

    margin-bottom:10px;

}

.st-header p{

    color:var(--light);

    font-size:18px;

}

/*=================================================
PRESETS
=================================================*/

.st-preset-bar{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    justify-content:center;

    margin-bottom:25px;

}

.preset{

    border:none;

    background:#fff;

    border:1px solid var(--border);

    border-radius:50px;

    padding:12px 20px;

    font-size:15px;

    transition:.25s;

}

.preset:hover{

    background:#eef8ff;

}

.preset.active{

    background:var(--primary);

    color:#fff;

}

/*=================================================
UPLOAD
=================================================*/

.upload-card{

    background:#fff;

    border-radius:20px;

    box-shadow:var(--shadow);

    padding:35px;

}

.upload-inner{

    min-height:320px;

    border:3px dashed #14a38b;

    border-radius:18px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    transition:.3s;

}

.upload-inner:hover{

    background:#f8fffd;

}

.upload-inner img{

    width:90px;

    margin-bottom:20px;

}

.upload-inner h2{

    font-size:34px;

    margin-bottom:10px;

}

.upload-inner p{

    color:#888;

    margin-bottom:18px;

}

.upload-inner span{

    margin-top:20px;

    color:#888;

}

#selectImage{

    border:none;

    background:var(--primary);

    color:#fff;

    padding:16px 40px;

    border-radius:12px;

    font-size:18px;

    font-weight:700;

    transition:.25s;

}

#selectImage:hover{

    background:var(--primary-dark);

}

.upload-inner.dragover{

    border-color:var(--blue);

    background:#eef5ff;

}

/*=================================================
EDITOR
=================================================*/

.editor{

    display:grid;

    grid-template-columns:1.6fr 0.9fr;

    gap:25px;

    margin-top:25px;

    align-items:start;

}

.editor-left,
.editor-right{

    background:#fff;

    border-radius:20px;

    box-shadow:var(--shadow);

    padding:25px;

}

/*=================================================
PREVIEW HEADER
=================================================*/

.preview-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

}

.preview-header h3{

    font-size:24px;

    font-weight:700;

}

.preview-tools{

    display:flex;

    gap:10px;

}

.preview-tools button{

    width:42px;

    height:42px;

    border:none;

    border-radius:10px;

    background:#f3f4f6;

    font-size:18px;

    transition:.25s;

}

.preview-tools button:hover{

    background:#2563eb;

    color:#fff;

}

/*=================================================
PREVIEW GRID
=================================================*/

.preview-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:20px;

}

.preview-box{

    background:#fafafa;

    border:1px solid var(--border);

    border-radius:18px;

    overflow:hidden;

}

.preview-title{

    padding:15px;

    font-weight:700;

    text-align:center;

    background:#fff;

    border-bottom:1px solid var(--border);

}

.image-preview{

    height:360px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:

    repeating-conic-gradient(

        #f8f8f8 0% 25%,

        #ffffff 0% 50%

    )

    50% / 20px 20px;

}

.image-preview img{

    max-width:95%;

    max-height:95%;

    object-fit:contain;

    transition:.25s;

}

/*=================================================
IMAGE INFO
=================================================*/

.image-info{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:10px;

    padding:15px;

    background:#fff;

}

.image-info div{

    background:#f8fafc;

    border-radius:10px;

    padding:12px;

}

.image-info span{

    display:block;

    color:#6b7280;

    font-size:13px;

    margin-bottom:5px;

}

.image-info strong{

    font-size:15px;

    color:#111827;

}

/*=================================================
TOOLBAR
=================================================*/

.toolbar{

    display:flex;

    gap:12px;

    margin-top:20px;

}

.toolbar button{

    flex:1;

    height:48px;

    border:none;

    border-radius:12px;

    background:#f3f4f6;

    font-size:16px;

    font-weight:600;

    transition:.25s;

}

.toolbar button:hover{

    background:#2563eb;

    color:#fff;

}

/*=================================================
RIGHT PANEL
=================================================*/

.st-card{

    background:#fff;

    border:1px solid var(--border);

    border-radius:16px;

    padding:20px;

    margin-bottom:20px;

}

.st-card h3{

    font-size:20px;

    margin-bottom:20px;

    color:#111827;

}

/*=================================================
FORM
=================================================*/

.field{

    margin-bottom:18px;

}

.field label{

    display:block;

    font-size:14px;

    font-weight:600;

    margin-bottom:8px;

    color:#374151;

}

.field input,
.field select{

    width:100%;

    height:48px;

    border:1px solid #d1d5db;

    border-radius:12px;

    padding:0 15px;

    font-size:16px;

    transition:.25s;

    background:#fff;

}

.field input:focus,
.field select:focus{

    border-color:#2563eb;

    outline:none;

    box-shadow:0 0 0 3px rgba(37,99,235,.12);

}

/*=================================================
WIDTH HEIGHT
=================================================*/

.grid-2{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:15px;

}

/*=================================================
RADIO
=================================================*/

.radio-group{

    display:flex;

    gap:25px;

}

.radio-group label{

    display:flex;

    align-items:center;

    gap:8px;

    cursor:pointer;

    font-weight:600;

}

/*=================================================
CHECKBOX
=================================================*/

.checkbox{

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:14px;

    cursor:pointer;

    font-size:15px;

}

.checkbox input{

    width:18px;

    height:18px;

}

/*=================================================
BUTTON
=================================================*/

.resize-btn{

    width:100%;

    height:56px;

    border:none;

    border-radius:14px;

    background:linear-gradient(135deg,#2563eb,#3b82f6);

    color:#fff;

    font-size:20px;

    font-weight:700;

    cursor:pointer;

    transition:.3s;

    margin-top:10px;

}

.resize-btn:hover{

    transform:translateY(-2px);

    box-shadow:0 12px 25px rgba(37,99,235,.25);

}

/*=================================================
DOWNLOAD
=================================================*/

.download-box{

    margin-top:20px;

}

.download-btn{

    width:100%;

    height:54px;

    border:none;

    border-radius:14px;

    background:#16a34a;

    color:#fff;

    font-size:18px;

    font-weight:700;

    cursor:pointer;

    transition:.25s;

}

.download-btn:hover{

    background:#15803d;

}

/*=================================================
TABLE
=================================================*/

.info-table{

    width:100%;

    border-collapse:collapse;

}

.info-table td{

    padding:12px 0;

    border-bottom:1px solid #edf2f7;

    font-size:15px;

}

.info-table td:first-child{

    color:#6b7280;

}

.info-table td:last-child{

    text-align:right;

    font-weight:600;

    color:#111827;

}
/*=================================================
PART 4
Animations • Responsive • Polish
=================================================*/

/* Smooth Animation */

@keyframes fadeUp{

0%{

opacity:0;

transform:translateY(20px);

}

100%{

opacity:1;

transform:translateY(0);

}

}

.st-app{

animation:fadeUp .4s ease;

}

/* Upload Hover */

.upload-card{

transition:.3s;

}

.upload-card:hover{

transform:translateY(-3px);

box-shadow:0 20px 45px rgba(0,0,0,.08);

}

/* Preview Hover */

.preview-box{

transition:.25s;

}

.preview-box:hover{

box-shadow:0 12px 30px rgba(0,0,0,.06);

}

/* Image Animation */

.image-preview img{

transition:.35s;

}

.image-preview img:hover{

transform:scale(1.02);

}

/* Loading Button */

.resize-btn.loading{

pointer-events:none;

opacity:.8;

}

.resize-btn.loading::after{

content:"";

width:20px;

height:20px;

border:3px solid rgba(255,255,255,.35);

border-top-color:#fff;

border-radius:50%;

display:inline-block;

margin-left:12px;

vertical-align:middle;

animation:spin .8s linear infinite;

}

@keyframes spin{

100%{

transform:rotate(360deg);

}

}

/* Download Animation */

.download-btn{

transition:.25s;

}

.download-btn:hover{

transform:translateY(-2px);

box-shadow:0 12px 25px rgba(22,163,74,.25);

}

/* Focus */

input:focus,

select:focus{

outline:none;

}

/* Scrollbar */

::-webkit-scrollbar{

width:10px;

height:10px;

}

::-webkit-scrollbar-thumb{

background:#cbd5e1;

border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

background:#94a3b8;

}

/* Responsive */

@media(max-width:1200px){

.editor{

grid-template-columns:1fr;

}

.editor-right{

margin-top:20px;

}

}

/* Tablet */

@media(max-width:768px){

.st-header h1{

font-size:30px;

}

.st-header p{

font-size:16px;

}

.preview-grid{

grid-template-columns:1fr;

}

.toolbar{

flex-wrap:wrap;

}

.toolbar button{

min-width:48%;

}

.grid-2{

grid-template-columns:1fr;

}

.radio-group{

flex-direction:column;

gap:12px;

}

}

/* Mobile */

@media(max-width:480px){

.st-app{

padding:10px;

}

.upload-card{

padding:20px;

}

.upload-inner{

min-height:220px;

}

.upload-inner h2{

font-size:24px;

}

.upload-inner img{

width:70px;

}

#selectImage{

width:100%;

}

.st-card{

padding:16px;

}

.preview-header{

flex-direction:column;

align-items:flex-start;

gap:15px;

}

.preview-tools{

width:100%;

display:grid;

grid-template-columns:repeat(5,1fr);

}

.preview-tools button{

width:100%;

}

.image-preview{

height:240px;

}

.resize-btn{

height:52px;

font-size:18px;

}

.download-btn{

height:50px;

font-size:17px;

}

}

/* Dark Mode Ready */

body.dark{

--bg:#111827;

--card:#1f2937;

--text:#f3f4f6;

--light:#9ca3af;

--border:#374151;

}

body.dark .editor-left,

body.dark .editor-right,

body.dark .upload-card,

body.dark .st-card,

body.dark .preview-box{

background:#1f2937;

color:#fff;

}

/* Success */

.success{

color:#16a34a;

font-weight:700;

}

/* Error */

.error{

color:#dc2626;

font-weight:700;

}

.error{

color:#dc2626;

font-weight:700;

}

/*=================================================
PROFESSIONAL CROP TOOL
=================================================*/

.crop-container{

    position:relative;

    width:100%;

    height:100%;

    display:flex;

    justify-content:center;

    align-items:center;

}

#editorCanvas{

    max-width:100%;

    max-height:100%;

    cursor:crosshair;

}

.crop-box{

    position:absolute;

    border:2px dashed #2563eb;

    background:rgba(37,99,235,.12);

    cursor:move;

}

.handle{

    position:absolute;

    width:12px;

    height:12px;

    background:#2563eb;

    border-radius:50%;

}

.tl{

    top:-6px;

    left:-6px;

}

.tr{

    top:-6px;

    right:-6px;

}

.bl{

    bottom:-6px;

    left:-6px;

}

.br{

    bottom:-6px;

    right:-6px;

}
