* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f5f3ef;
    --card: #ffffff;
    --text: #242321;
    --muted: #77736d;
    --border: #dedbd5;
    --dark: #252422;
    --accent: #a17c55;
    --accent-light: #f1e9df;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}


/* HEADER */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1180px;
    margin: auto;
    padding: 20px 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.logo-mark {
    width: 42px;
    height: 42px;

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

    border-radius: 12px;

    background: var(--dark);
    color: white;

    font-size: 20px;
    font-weight: bold;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text strong {
    font-size: 19px;
}

.logo-text small {
    font-size: 11px;
    color: var(--muted);
}

.header-badge {
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: bold;
    color: var(--accent);
}


/* HERO */

.hero {
    padding: 75px 20px 55px;
    text-align: center;
}

.hero-content {
    max-width: 760px;
    margin: auto;
}

.hero-label {
    display: inline-block;

    margin-bottom: 18px;

    padding: 7px 14px;

    border-radius: 30px;

    background: var(--accent-light);
    color: var(--accent);

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -3px;
    margin-bottom: 25px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    max-width: 620px;
    margin: auto;

    color: var(--muted);

    font-size: 17px;
}


/* WORKSPACE */

.workspace {
    padding: 20px;
    padding-bottom: 80px;
}

.workspace-card {
    max-width: 850px;
    margin: auto;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 22px;

    padding: 40px;

    box-shadow: 0 15px 50px rgba(0,0,0,0.05);
}

.workspace-header {
    margin-bottom: 30px;
}

.step-label {
    color: var(--accent);

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.workspace-header h2 {
    margin-top: 5px;
    font-size: 30px;
}

.workspace-header p {
    color: var(--muted);
}


/* UPLOAD */

.upload-area {
    min-height: 300px;

    border: 2px dashed #cfcac2;

    border-radius: 18px;

    background: #faf9f7;

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

    cursor: pointer;

    transition: 0.2s;

    position: relative;

    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--accent);
    background: #fdfbf8;
}

.upload-content {
    text-align: center;
}

.upload-icon {
    width: 60px;
    height: 60px;

    border-radius: 50%;

    background: var(--accent-light);
    color: var(--accent);

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

    margin: auto auto 15px;

    font-size: 32px;
}

.upload-content h3 {
    font-size: 19px;
    margin-bottom: 5px;
}

.upload-content p {
    color: var(--muted);
    font-size: 14px;
}

.upload-formats {
    display: block;
    margin-top: 12px;

    color: #99938b;

    font-size: 11px;
}

.preview-container {
    display: none;

    width: 100%;
    height: 100%;
    position: absolute;
}

.preview-container img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.remove-photo {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    background: rgba(0,0,0,0.7);
    color: white;

    font-size: 23px;

    cursor: pointer;
}


/* FORM */

.form-section {
    margin-top: 30px;
}

.form-label {
    display: block;

    margin-bottom: 10px;

    font-size: 14px;
    font-weight: bold;
}

.form-label span {
    margin-left: 5px;

    color: #999;

    font-weight: normal;
    font-size: 11px;
}

.form-control {
    width: 100%;

    padding: 14px 15px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: white;

    color: var(--text);

    font-size: 14px;

    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
}

.textarea {
    resize: vertical;
}


/* STYLE GRID */

.style-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 10px;
}

.style-option {
    min-height: 85px;

    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: white;

    cursor: pointer;

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

    gap: 7px;

    transition: 0.2s;
}

.style-option:hover {
    border-color: var(--accent);
}

.style-option.active {
    border-color: var(--accent);

    background: var(--accent-light);

    color: var(--accent);
}

.style-icon {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #f1efeb;

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

    font-size: 11px;
    font-weight: bold;
}

.style-option.active .style-icon {
    background: var(--accent);
    color: white;
}


/* GENERATE */

.generate-section {
    margin-top: 35px;

    text-align: center;
}

.generate-button {
    width: 100%;

    padding: 17px 25px;

    border: 0;
    border-radius: 12px;

    background: var(--dark);
    color: white;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

.generate-button:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.generate-icon {
    margin-right: 8px;
    color: #d7b58e;
}

.generate-note {
    margin-top: 10px;

    color: #99938b;

    font-size: 11px;
}


/* HOW IT WORKS */

.how-section {
    max-width: 1100px;

    margin: auto;

    padding: 70px 20px 100px;
}

.section-heading {
    text-align: center;

    margin-bottom: 40px;
}

.section-heading > span {
    color: var(--accent);

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.section-heading h2 {
    margin-top: 8px;

    font-size: 34px;
}

.process-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.process-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 30px;
}

.process-number {
    color: var(--accent);

    font-size: 12px;
    font-weight: bold;

    margin-bottom: 15px;
}

.process-card h3 {
    margin-bottom: 8px;

    font-size: 21px;
}

.process-card p {
    color: var(--muted);

    font-size: 14px;
}


/* FOOTER */

.site-footer {
    background: var(--dark);
    color: white;

    padding: 30px 25px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    font-size: 12px;
}

.site-footer div:first-child {
    display: flex;
    flex-direction: column;
}

.site-footer span {
    color: #aaa;
    margin-top: 3px;
}


/* MOBILE */

@media (max-width: 700px) {

    .header-inner {
        padding: 15px;
    }

    .header-badge {
        display: none;
    }

    .hero {
        padding: 55px 20px 40px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero p {
        font-size: 15px;
    }

    .workspace {
        padding: 10px;
    }

    .workspace-card {
        padding: 22px;
        border-radius: 18px;
    }

    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .site-footer {
        flex-direction: column;
    }
}


/* =========================================================
   ROOMREVIVE RESULT
   ========================================================= */

.roomrevive-result {
    display: none;
    max-width: 1120px;
    margin: 40px auto 80px;
    padding: 42px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,.06);
}

.result-heading {
    text-align: center;
    margin-bottom: 30px;
}

.result-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
}

.result-heading h2 {
    margin: 0 0 8px;
    font-size: 32px;
    color: var(--text);
}

.result-heading p {
    margin: 0;
    color: var(--muted);
}

.before-after-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.result-card {
    overflow: hidden;
    background: #faf9f7;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.result-card-title {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--muted);
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.result-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.result-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
}

.result-button.primary {
    color: #fff;
    background: var(--dark);
    border-color: var(--dark);
}

.result-button.secondary {
    color: var(--text);
    background: var(--card);
}

.result-button:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.generate-button:disabled {
    opacity: .65;
    cursor: wait;
}


/* Mobile */

@media (max-width: 700px) {

    .roomrevive-result {
        margin: 25px 16px 50px;
        padding: 24px 18px;
        border-radius: 18px;
    }

    .result-heading h2 {
        font-size: 26px;
    }

    .before-after-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-button {
        width: 100%;
    }
}


/* =========================================================
   ROOMREVIVE CONCEPT HISTORY
   ========================================================= */

.roomrevive-concepts {
    display: none;
    max-width: 1120px;
    margin: 40px auto 80px;
    padding: 42px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,.06);
}

.concept-heading {
    text-align: center;
    margin-bottom: 32px;
}

.concept-heading h2 {
    margin: 0 0 8px;
    font-size: 32px;
    color: var(--text);
}

.concept-heading p {
    margin: 0;
    color: var(--muted);
}

.concept-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.concept-card {
    overflow: hidden;
    background: #faf9f7;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.concept-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.concept-number {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: var(--accent);
}

.concept-card-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--text);
}

.concept-color {
    padding: 7px 12px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
}

.concept-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

.concept-image-box {
    position: relative;
    overflow: hidden;
    background: #eee;
}

.concept-image-box > span {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 5px;
    background: rgba(255,255,255,.9);
    color: var(--text);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.concept-image-box img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.concept-actions {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: var(--card);
}

.concept-footer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

@media (max-width: 700px) {

    .roomrevive-concepts {
        margin: 25px 16px 50px;
        padding: 24px 18px;
        border-radius: 18px;
    }

    .concept-heading h2 {
        font-size: 26px;
    }

    .concept-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .concept-images {
        grid-template-columns: 1fr;
    }

    .concept-actions .result-button {
        width: 100%;
    }

    .concept-footer .result-button {
        width: 100%;
    }
}


/*
|--------------------------------------------------------------------------
| Saved Projects
|--------------------------------------------------------------------------
*/

.saved-projects-section {
    padding: 80px 0;
}

.saved-projects-section .section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.saved-projects-section .section-heading h2 {
    margin: 10px 0 12px;
}

.saved-projects-section .section-heading p {
    margin: 0;
    color: var(--muted);
}


.saved-projects-list {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}


.saved-projects-loading,
.saved-projects-empty {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}


.saved-project-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: center;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}


.saved-project-thumbnail {
    width: 100%;
    height: 210px;
    overflow: hidden;
    border-radius: 14px;
    background: #eee;
}


.saved-project-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.saved-project-info {
    padding: 8px 10px;
}


.saved-project-info h3 {
    margin: 8px 0;
}


.saved-project-info p {
    color: var(--muted);
    margin: 0 0 20px;
}


.view-project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}


.project-details {
    max-width: 1100px;
    margin: 50px auto 0;
}


.project-details-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 40px;
}


.project-details-header > div {
    flex: 1;
}


.project-details-header h2 {
    margin: 8px 0;
}


.project-details-header p {
    color: var(--muted);
    margin: 0;
}


.project-original,
.project-concepts {
    margin-top: 40px;
}


.project-original h3,
.project-concepts h3 {
    margin-bottom: 18px;
}


.project-image-card {
    max-width: 850px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
}


.project-image-card img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}


.saved-concepts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}


.saved-concept-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}


.saved-concept-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #eee;
}


.saved-concept-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.saved-concept-info {
    padding: 20px;
}


.saved-concept-info h4 {
    margin: 8px 0;
}


.saved-concept-info p {
    color: var(--muted);
    margin: 0 0 18px;
}


.concept-number {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}


@media (max-width: 760px) {

    .saved-project-card {
        grid-template-columns: 1fr;
    }

    .saved-project-thumbnail {
        height: 220px;
    }

    .project-details-header {
        flex-direction: column;
    }

    .saved-concepts-list {
        grid-template-columns: 1fr;
    }

    .saved-concept-image {
        height: 260px;
    }

}



/*
|--------------------------------------------------------------------------
| Before / After Concept Presentation
|--------------------------------------------------------------------------
*/

.saved-concept-heading {
    padding: 22px 22px 10px;
}

.saved-concept-heading h4 {
    margin: 8px 0 6px;
    font-size: 20px;
}

.saved-concept-heading p {
    margin: 0;
    color: var(--muted);
}


.before-after-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 22px 0;
}


.before-after-panel {
    overflow: hidden;
    border-radius: 14px;
    background: #f3f3f3;
}


.before-after-label {
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: center;
    background: #222;
    color: #fff;
}


.before-after-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}


.before-after-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.saved-concept-actions {
    display: flex;
    justify-content: flex-end;
    padding: 18px 22px 22px;
}


@media (max-width: 760px) {

    .before-after-grid {
        grid-template-columns: 1fr;
    }

    .before-after-image {
        aspect-ratio: 4 / 3;
    }

    .saved-concept-actions {
        justify-content: stretch;
    }

    .saved-concept-actions .secondary-button {
        width: 100%;
    }

}


/* ==============================
   ACCOUNT HEADER
   ============================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-button {
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
    color: inherit;
    border-radius: 8px;
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-button:hover {
    background: rgba(255,255,255,0.16);
}

.account-button-primary {
    background: #ffffff;
    color: #222222;
    border-color: #ffffff;
}

.account-button-primary:hover {
    background: #f1f1f1;
}

@media (max-width: 700px) {
    .header-actions {
        gap: 8px;
    }

    .header-badge {
        display: none;
    }

    .account-button {
        padding: 8px 11px;
        font-size: 13px;
    }
}


/* ==============================
   AUTHENTICATION MODAL
   ============================== */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal[hidden] {
    display: none;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
}

.auth-modal-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    color: #222222;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #666666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}

.auth-modal-close:hover {
    background: #f2f2f2;
    color: #222222;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-modal-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #222222;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

.auth-modal-header h2 {
    margin: 0 0 7px;
    font-size: 24px;
}

.auth-modal-header p {
    margin: 0;
    color: #707070;
    font-size: 14px;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.auth-form[hidden] {
    display: none;
}

.auth-form label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-top: 5px;
}

.auth-form input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7d7d7;
    border-radius: 9px;
    padding: 12px 13px;
    font-size: 15px;
    background: #ffffff;
    color: #222222;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    border-color: #777777;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

.auth-submit-button {
    margin-top: 10px;
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 13px 16px;
    background: #222222;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.auth-submit-button:hover {
    opacity: 0.9;
}

.auth-submit-button:active {
    transform: translateY(1px);
}

.auth-submit-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.auth-switch {
    margin: 15px 0 0;
    text-align: center;
    color: #707070;
    font-size: 14px;
}

.auth-switch button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #222222;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.auth-message {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-message[hidden] {
    display: none;
}

.auth-message.error {
    background: #fff0f0;
    color: #9b2226;
    border: 1px solid #f2c4c4;
}

.auth-message.success {
    background: #effaf1;
    color: #237a3b;
    border: 1px solid #c5e8cc;
}

@media (max-width: 520px) {
    .auth-modal {
        padding: 12px;
    }

    .auth-modal-card {
        padding: 26px 20px;
        border-radius: 15px;
    }

    .auth-modal-header h2 {
        font-size: 21px;
    }
}


/* Logged-in account display */

.account-logged-in {
    display: flex;
    align-items: center;
}

.account-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.2;
}

.account-user-info strong {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
}

.account-user-info span {
    color: #777777;
    font-size: 12px;
}

@media (max-width: 700px) {
    .account-user-info strong {
        font-size: 13px;
    }

    .account-user-info span {
        font-size: 11px;
    }
}


.account-logout-button {
    padding: 7px 11px;
    font-size: 12px;
    border-color: rgba(0,0,0,0.15);
    background: rgba(0,0,0,0.04);
    color: #333333;
}

.account-logout-button:hover {
    background: rgba(0,0,0,0.08);
}

.account-logout-button:disabled {
    opacity: 0.55;
    cursor: wait;
}



/* BUY CREDITS */

.credits-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.credits-modal[hidden] {
    display: none;
}

.credits-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(4px);
}

.credits-modal-card {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 34px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.credits-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.credits-modal-close:hover {
    background: #e2e8f0;
}

.credits-modal-header {
    text-align: center;
    padding: 4px 32px 26px;
}

.credits-modal-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.credits-modal-header h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 28px;
    line-height: 1.2;
}

.credits-modal-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.credits-message {
    margin: 0 0 20px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.credits-message[hidden] {
    display: none;
}

.credits-message.error {
    background: #fef2f2;
    color: #b91c1c;
}

.credits-message.success {
    background: #f0fdf4;
    color: #15803d;
}

.credits-message.info {
    background: #eff6ff;
    color: #1d4ed8;
}

.credit-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.credit-package {
    position: relative;
    min-height: 245px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px 18px 22px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.credit-package:hover {
    transform: translateY(-3px);
    border-color: #94a3b8;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.credit-package:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.credit-package-name {
    margin-bottom: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.credit-package strong {
    margin-bottom: 7px;
    font-size: 34px;
    line-height: 1;
}

.credit-package-credits {
    margin-bottom: 20px;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
}

.credit-package-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.credit-package-featured {
    border-color: #111827;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

.credit-package-featured .credit-package-action {
    background: #111827;
}

.credit-package-badge {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
}

.credits-payment-note {
    margin: 22px 0 0;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 700px) {

    .credits-modal {
        padding: 14px;
    }

    .credits-modal-card {
        max-height: calc(100vh - 28px);
        padding: 26px 18px 22px;
        border-radius: 18px;
    }

    .credits-modal-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    .credits-modal-header h2 {
        font-size: 23px;
    }

    .credit-packages {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .credit-package {
        min-height: 170px;
    }

    .credit-package strong {
        font-size: 30px;
    }

}


/* BUY CREDITS ACCOUNT BUTTON */

.account-buy-credits-button {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

.account-buy-credits-button:hover {
    background: #1f2937;
    border-color: #1f2937;
    color: #ffffff;
}

