.astrasolara-planet-table {
    background: var(--color-surface, #0f0f19);
    color: var(--color-text, #ffffff);
    padding: 3rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(6, 10, 32, 0.45);
    position: relative;
    overflow: hidden;
}

.astrasolara-planet-table__hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.astrasolara-planet-table__title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    margin-bottom: 0.75rem;
}

.astrasolara-planet-table__subtitle {
    font-size: 1.05rem;
    max-width: 48rem;
    margin: 0 auto;
    opacity: 0.8;
}

.astrasolara-planet-table__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    background: linear-gradient(135deg, #6c5ce7, #9b59b6);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.astrasolara-planet-table__cta-button:hover,
.astrasolara-planet-table__cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.45);
}

.astrasolara-planet-table__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 720px;
    margin: 0 auto;
}

.astrasolara-planet-table__form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.astrasolara-planet-table__form-row label {
    font-size: 0.95rem;
    font-weight: 600;
}

.astrasolara-planet-table__form-row input[type="date"],
.astrasolara-planet-table__form-row input[type="time"],
.astrasolara-planet-table__form-row input[type="text"] {
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 19, 38, 0.75);
    color: inherit;
}

.astrasolara-planet-table__hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

.astrasolara-planet-table__submit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    justify-content: center;
}

.astrasolara-planet-table__submit {
    padding: 0.95rem 2.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f2994a, #f2c94c);
    color: #0f0f19;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.astrasolara-planet-table__submit:hover,
.astrasolara-planet-table__submit:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(242, 153, 74, 0.4);
}

.astrasolara-planet-table__feedback {
    background: rgba(255, 99, 132, 0.12);
    border: 1px solid rgba(255, 99, 132, 0.35);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.astrasolara-planet-table__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 2rem 0;
}

.astrasolara-planet-table__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #8c7df0;
    border-radius: 50%;
    animation: astrasolara-spinner 0.9s linear infinite;
}

@keyframes astrasolara-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.astrasolara-planet-table__results {
    margin-top: 2rem;
    background: rgba(4, 8, 28, 0.6);
    border-radius: 14px;
    padding: 1.5rem;
}

.astrasolara-planet-table__results-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}


.astrasolara-planet-table__sun-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(30, 26, 62, 0.8), rgba(65, 52, 118, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.astrasolara-planet-table__sun-image-wrap {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.astrasolara-planet-table__sun-image-wrap img {
    width: 95%;
    height: 95%;
    object-fit: contain;
}

.astrasolara-planet-table__sun-copy h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.astrasolara-planet-table__sun-copy p {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

.astrasolara-planet-table__actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-end;
}

.astrasolara-planet-table__save-hint {
    font-size: 0.8rem;
    opacity: 0.65;
}

.astrasolara-planet-table__sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.astrasolara-planet-table__sort-button {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.astrasolara-planet-table__sort-button.is-active {
    background: rgba(156, 107, 255, 0.25);
    border-color: rgba(156, 107, 255, 0.6);
}

.astrasolara-planet-table__table-wrapper {
    overflow-x: auto;
}

.astrasolara-planet-table__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.astrasolara-planet-table__table thead {
    background: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.astrasolara-planet-table__table th,
.astrasolara-planet-table__table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.astrasolara-planet-table__cell--planet {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.astrasolara-planet-table__glyph {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--glyph-color, #ffffff);
    color: var(--glyph-color, #ffffff);
}

.astrasolara-planet-table__glyph--modal {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
}

.astrasolara-planet-table__label {
    font-weight: 600;
    font-size: 1rem;
}

.astrasolara-planet-table__interpret {
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.astrasolara-planet-table__interpret:hover,
.astrasolara-planet-table__interpret:focus {
    background: rgba(255, 255, 255, 0.08);
}

.astrasolara-planet-table__modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.astrasolara-planet-table__modal[hidden] {
    display: none;
}

.astrasolara-planet-table__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 21, 0.85);
}

.astrasolara-planet-table__modal-content {
    position: relative;
    z-index: 1;
    background: #0e0f1f;
    border-radius: 18px;
    padding: 2.5rem 2rem;
    width: min(720px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.astrasolara-planet-table__modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: transparent;
    color: inherit;
    border: none;
    cursor: pointer;
}

.astrasolara-planet-table__modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.astrasolara-planet-table__modal-title strong {
    display: block;
    font-size: 1.35rem;
}

.astrasolara-planet-table__modal-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.astrasolara-planet-table__modal-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.astrasolara-planet-table__modal-tab.is-active {
    background: rgba(156, 107, 255, 0.25);
    border-color: rgba(156, 107, 255, 0.6);
}

.astrasolara-planet-table__modal-body h4 {
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.astrasolara-planet-table__list {
    margin: 0.6rem 0 0 1.2rem;
    list-style: disc;
    opacity: 0.85;
}

body.astrasolara-planet-table--modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .astrasolara-planet-table__sun-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .astrasolara-planet-table__sun-image-wrap {
        width: 72px;
        height: 72px;
    }


    .astrasolara-planet-table {
        padding: 2.5rem 1rem;
    }

    .astrasolara-planet-table__form {
        grid-template-columns: 1fr;
    }

    .astrasolara-planet-table__results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .astrasolara-planet-table__actions {
        width: 100%;
        align-items: stretch;
    }

    .astrasolara-planet-table__save {
        width: 100%;
    }
}

.astrasolara-planet-table__loading[hidden] {
    display: none !important;
}
