* {
    box-sizing: border-box;
}

.rotator-page {
    min-height: 100vh;
    padding: 42px 20px 70px;
    background: #f7f8fa;
    color: #1f2937;
}


/* =====================================================
   HEADER
===================================================== */

.rotator-header {
    max-width: 1100px;
    margin: 0 auto 32px;
    text-align: center;
}

.rotator-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid #d9dee7;
    border-radius: 999px;
    background: #ffffff;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.rotator-header h1 {
    margin: 14px 0 10px;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -.025em;
    color: #111827;
}

.rotator-header p {
    max-width: 680px;
    margin: 0 auto;
    color: #667085;
    font-size: 15px;
    line-height: 1.7;
}


/* =====================================================
   MAIN CONTAINER
===================================================== */

.rotator-container {
    max-width: 1100px;
    margin: 0 auto;
}


/* =====================================================
   UPLOAD
===================================================== */

.rotator-upload {
    min-height: 300px;
    padding: 55px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    background: #ffffff;
    border: 1.5px dashed #cbd3df;
    border-radius: 18px;

    transition:
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.rotator-upload:hover {
    border-color: #98a2b3;
    background: #fcfcfd;
}

.rotator-upload.dragover {
    border-color: #344054;
    background: #f9fafb;
    transform: translateY(-2px);
}

.rotator-upload-icon {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;
    background: #f2f4f7;
    color: #344054;

    font-size: 32px;
    font-weight: 500;
}

.rotator-upload h2 {
    margin: 20px 0 8px;
    font-size: 21px;
    color: #101828;
}

.rotator-upload p {
    margin: 0 0 20px;
    color: #667085;
    font-size: 14px;
}

.rotator-browse-button {
    border: 0;
    border-radius: 9px;
    padding: 11px 20px;

    background: var(--gp-gradient);
    color: #ffffff;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.rotator-browse-button:hover {
    background: var(--gp-gradient-hover);
    transform: translateY(-1px);
}

.rotator-upload-note {
    margin-top: 14px;
    color: #98a2b3;
    font-size: 12px;
}


/* =====================================================
   FILE INFO
===================================================== */

.rotator-file-info {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;

    margin-top: 20px;
    padding: 20px;

    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
}

.rotator-file-preview {
    height: 150px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;
    background: #f2f4f7;
}

.rotator-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rotator-file-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rotator-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;

    gap: 20px;
}

.rotator-detail-row:last-child {
    border-bottom: 0;
}

.rotator-detail-row span {
    color: #667085;
    font-size: 13px;
}

.rotator-detail-row strong {
    color: #344054;
    font-size: 13px;
    text-align: right;
    word-break: break-word;
}

.rotator-status {
    color: #067647 !important;
}


/* =====================================================
   EDITOR
===================================================== */

.rotator-editor {
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    overflow: hidden;
}

.rotator-editor-header {
    padding: 22px 24px;
    border-bottom: 1px solid #eaecf0;
}

.rotator-editor-header h2 {
    margin: 0 0 5px;
    color: #101828;
    font-size: 19px;
}

.rotator-editor-header p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}


/* =====================================================
   WORKSPACE
===================================================== */

.rotator-workspace {
    padding: 24px;
    background: #17191d;
}

.rotator-preview-area {
    min-height: 430px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    border-radius: 12px;
    background:
        linear-gradient(
            45deg,
            #202328 25%,
            transparent 25%
        ),
        linear-gradient(
            -45deg,
            #202328 25%,
            transparent 25%
        ),
        linear-gradient(
            45deg,
            transparent 75%,
            #202328 75%
        ),
        linear-gradient(
            -45deg,
            transparent 75%,
            #202328 75%
        );

    background-size: 24px 24px;
    background-position:
        0 0,
        0 12px,
        12px -12px,
        -12px 0;
}

.rotator-preview-area img {
    display: block;

    max-width: 100%;
    max-height: 500px;

    width: auto;
    height: auto;

    object-fit: contain;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, .35);

    border-radius: 3px;

    transition:
        transform .25s ease,
        opacity .2s ease;
}


/* =====================================================
   CONTROLS
===================================================== */

.rotator-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;

    padding: 24px;
    border-bottom: 1px solid #eaecf0;
}

.rotator-control-group h3 {
    margin: 0 0 12px;

    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.rotator-button-grid {
    display: grid;
    gap: 9px;
}

.rotator-control-button {
    min-height: 55px;

    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 9px;

    padding: 9px 12px;

    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;

    color: #344054;

    font-size: 12px;
    font-weight: 650;

    text-align: left;
    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.rotator-control-button:hover {
    border-color: #98a2b3;
    background: #f9fafb;
    transform: translateY(-1px);
}

.rotator-control-button.active {
    border-color: #344054;
    background: #f2f4f7;
}

.rotator-button-icon {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;
    background: #f2f4f7;

    font-size: 17px;
}

.rotator-control-button small {
    color: #98a2b3;
    font-size: 10px;
}


/* =====================================================
   FORMAT
===================================================== */

.rotator-format-options {
    display: grid;
    gap: 9px;
}

.rotator-format-option {
    min-height: 42px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 12px;

    border: 1px solid #eaecf0;
    border-radius: 9px;

    color: #475467;
    font-size: 12px;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease;
}

.rotator-format-option:hover {
    border-color: #cbd5e1;
    background: #f9fafb;
}

.rotator-format-option input {
    margin: 0;
    accent-color: #111827;
}


/* =====================================================
   SETTINGS
===================================================== */

.rotator-settings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    padding: 20px 24px;

    background: #fafafa;
    border-bottom: 1px solid #eaecf0;
}

.rotator-setting {
    padding: 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 9px;
}

.rotator-setting span {
    color: #667085;
    font-size: 12px;
}

.rotator-setting strong {
    color: #101828;
    font-size: 12px;
}


/* =====================================================
   ACTIONS
===================================================== */

.rotator-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 20px 24px;
}

.rotator-reset-button,
.rotator-apply-button {
    min-height: 44px;

    padding: 0 18px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;
}

.rotator-reset-button {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    color: #344054;
}

.rotator-reset-button:hover {
    background: #f9fafb;
}

.rotator-apply-button {
    min-width: 150px;

    border: 0;
    background: var(--gp-gradient);
    color: #ffffff;
}

.rotator-apply-button:hover {
    background: var(--gp-gradient-hover);
}

.rotator-apply-button:disabled {
    opacity: .6;
    cursor: not-allowed;
}


/* =====================================================
   RESULT
===================================================== */

.rotator-result {
    margin-top: 20px;

    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 18px;

    overflow: hidden;
}

.rotator-result-header {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 22px 24px;

    border-bottom: 1px solid #eaecf0;
}

.rotator-success-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ecfdf3;
    color: #067647;

    font-size: 20px;
    font-weight: 700;
}

.rotator-result-header h2 {
    margin: 0 0 4px;

    color: #101828;
    font-size: 18px;
}

.rotator-result-header p {
    margin: 0;

    color: #667085;
    font-size: 13px;
}

.rotator-result-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 24px;

    padding: 24px;
}

.rotator-result-image {
    min-height: 380px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: #f2f4f7;
    border-radius: 12px;
}

.rotator-result-image img {
    max-width: 100%;
    max-height: 500px;

    object-fit: contain;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.rotator-result-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rotator-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 13px 0;

    border-bottom: 1px solid #eaecf0;
}

.rotator-result-row span {
    color: #667085;
    font-size: 13px;
}

.rotator-result-row strong {
    color: #101828;
    font-size: 13px;
    text-align: right;
}

.rotator-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-top: 22px;
}

.rotator-download-button,
.rotator-new-button {
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 650;

    text-decoration: none;
    cursor: pointer;
}

.rotator-download-button {
    background: var(--gp-gradient);
    color: #ffffff;
}

.rotator-download-button:hover {
    background: var(--gp-gradient-hover);
}

.rotator-new-button {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    color: #344054;
}

.rotator-new-button:hover {
    background: #f9fafb;
}


/* =====================================================
   ERROR
===================================================== */

.rotator-error {
    margin-top: 20px;

    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 16px 18px;

    border: 1px solid #fecdca;
    border-radius: 12px;

    background: #fffbfa;
}

.rotator-error-icon {
    width: 30px;
    height: 30px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fee4e2;
    color: #b42318;

    font-weight: 700;
}

.rotator-error strong {
    display: block;

    margin-bottom: 3px;

    color: #b42318;
    font-size: 13px;
}

.rotator-error p {
    margin: 0;

    color: #912018;
    font-size: 12px;
    line-height: 1.5;
}


/* =====================================================
   INFORMATION CARDS
===================================================== */

.rotator-info-section {
    max-width: 1100px;

    margin: 30px auto 0;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rotator-info-card {
    padding: 22px;

    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
}

.rotator-info-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 15px;

    border-radius: 10px;

    background: #f2f4f7;
    color: #344054;

    font-size: 20px;
}

.rotator-info-card h3 {
    margin: 0 0 7px;

    color: #101828;
    font-size: 15px;
}

.rotator-info-card p {
    margin: 0;

    color: #667085;

    font-size: 12px;
    line-height: 1.7;
}


/* =====================================================
   LOADING
===================================================== */

.rotator-loading {
    opacity: .65;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {

    .rotator-controls {
        grid-template-columns: 1fr;
    }

    .rotator-result-content {
        grid-template-columns: 1fr;
    }

    .rotator-info-section {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    .rotator-page {
        padding: 28px 14px 50px;
    }

    .rotator-header h1 {
        font-size: 30px;
    }

    .rotator-file-info {
        grid-template-columns: 1fr;
    }

    .rotator-file-preview {
        height: 220px;
    }

    .rotator-workspace {
        padding: 12px;
    }

    .rotator-preview-area {
        min-height: 300px;
        padding: 12px;
    }

    .rotator-settings {
        grid-template-columns: 1fr;
    }

    .rotator-actions {
        flex-direction: column;
    }

    .rotator-reset-button,
    .rotator-apply-button {
        width: 100%;
    }

    .rotator-result-content {
        padding: 15px;
    }

    .rotator-result-image {
        min-height: 280px;
    }

}


@media (max-width: 450px) {

    .rotator-header h1 {
        font-size: 26px;
    }

    .rotator-upload {
        min-height: 260px;
        padding: 40px 18px;
    }

    .rotator-button-grid {
        grid-template-columns: 1fr;
    }

    .rotator-control-button {
        grid-template-columns: 30px 1fr auto;
    }

}


/* The HTML "hidden" attribute must win over the display rules above,
   otherwise sections meant to stay hidden can show up at once. */
[hidden] {
    display: none !important;
}
