body{
    font-family:'Syne', sans-serif;
    background:#f9fafb;
    margin:0;
}

/* HERO */
.essay-hero{
    text-align:center;
    padding:120px 20px 80px;
}

.tag{
    font-size:12px;
    letter-spacing:3px;
    color:#ff6a2a;
    margin-bottom:20px;
}

.essay-hero h1{
    font-size:72px;
    font-weight:700;
    line-height:1.1;
    color:#0b132b;
    margin:0;
}

.subtitle{
    margin-top:20px;
    font-size:16px;
    color:#6b7280;
}

.hero-icon img{
    margin-top:40px;
    width:70px;
}

/* TONE */
.tone-section{
    padding:80px 120px;
    background:#f3f4f6;
}

.tone-section h2{
    font-size:28px;
    margin-bottom:40px;
}

.tone-grid{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:30px;
}

.tone-card{
    height:160px;
    border-radius:20px;
    background:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:600;
    cursor:pointer;
    border:1px solid #e5e7eb;
}

.tone-card:hover{
    border:2px solid #ff6a2a;
}

.tone-card.active{
    border:2px solid #ff6a2a;
}

.tone-card.custom{
    flex-direction:column;
    gap:10px;
    padding:20px;
}

.tone-card textarea{
    width:100%;
    border-radius:10px;
    border:1px solid #ddd;
    padding:10px;
}

/* INPUT */
.input-section{
    padding:80px 120px;
}

.tab-header{
    display:flex;
    justify-content:center;
    gap:60px;
    font-size:14px;
    font-weight:600;
}

.tab-header span{
    cursor:pointer;
    padding-bottom:6px;
}

.active-tab{
    border-bottom:2px solid #ff6a2a;
    color:#ff6a2a;
}

.tab-content{
    display:none;
}

.tab-content.active{
    display:block;
}

/* UPLOAD BOX */
.upload-box{
    margin:40px auto;
    width:600px;
    border:2px dashed #e5e7eb;
    border-radius:20px;
    padding:60px;
    text-align:center;
}

.upload-box img{
    width:80px;
    margin-bottom:20px;
}

.upload-btn{
    background:#ff6a2a;
    color:white;
    padding:14px 40px;
    border:none;
    border-radius:12px;
    font-size:16px;
    cursor:pointer;
}

/* TEXTAREA */
textarea{
    width:600px;
    height:200px;
    margin:40px auto;
    display:block;
    padding:15px;
    border-radius:12px;
    border:1px solid #ddd;
}

/* ANALYZE */
.analyze-btn{
    display:block;
    margin:40px auto;
    padding:16px 60px;
    background:#ff6a2a;
    color:white;
    border:none;
    border-radius:14px;
    font-size:16px;
    cursor:pointer;
}

/* RESULT */
.result-section{
    display:grid;
    grid-template-columns:1.5fr 1fr;
    gap:50px;
    padding:100px 120px;
}

.essay-box{
    background:#f3f4f6;
    padding:50px;
    border-radius:20px;
}

.analysis-section{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.analysis-card{
    background:white;
    padding:20px;
    border-radius:10px;
}

.red{border-left:4px solid #ef4444;}
.orange{border-left:4px solid #f97316;}
.yellow{border-left:4px solid #eab308;}
.green{border-left:4px solid #22c55e;}

/* LEGEND */
.legend{
    display:flex;
    gap:25px;
    flex-wrap:wrap;
    margin-bottom:20px;
    font-size:14px;
    color:#6b7280;
}

.legend div{
    display:flex;
    align-items:center;
    gap:8px;
}

.dot{
    width:10px;
    height:10px;
    border-radius:50%;
}

.dot.red{background:#ef4444;}
.dot.orange{background:#f59e0b;}
.dot.yellow{background:#eab308;}
.dot.green{background:#22c55e;}

.remove-btn{
    margin-top:10px;
    background:#e5e7eb;
    color:#111827;
    padding:10px 25px;
    border:none;
    border-radius:10px;
    font-size:14px;
    cursor:pointer;
}

.remove-btn:hover{
    background:#d1d5db;
}

/* FIX CUSTOM CARD POSITION */
.tone-card.custom{
    grid-column: span 1;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.tone-card.custom textarea{
    width:80%;
    margin:0 auto;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #ff7a00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #eee;
    border-top: 5px solid #ff6a2a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(255,255,255,0.8);

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #eee;
    border-top: 5px solid #ff6a2a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.essay-highlight {
    padding: 3px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.essay-highlight:hover {
    opacity: 0.8;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}