* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

.site-header__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-weight: 700;
    font-size: 18px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.nav-button {
    background: #ff4a2b;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 999px;
}

.main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

.site-footer {
    text-align: center;
    padding: 32px 16px;
    color: #888888;
    font-size: 13px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.page-title {
    font-size: 24px;
    margin: 0 0 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.button {
    display: inline-block;
    border: none;
    background: #ff4a2b;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.button-full {
    width: 100%;
}

.button-secondary {
    background: #555555;
}

.button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #ffecec;
    color: #b00020;
}

.alert-success {
    background: #ecfff1;
    color: #147a35;
}

.link-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.dashboard-menu {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.dashboard-menu__item {
    display: block;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.dashboard-menu__item:hover {
    background: #fff5f2;
    border-color: #ff4a2b;
}

.form-help {
    margin: 6px 0 0;
    color: #888888;
    font-size: 13px;
}

.profile-preview-small {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 14px;
    background: #fafafa;
    border-radius: 14px;
}

.profile-preview-small__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #eeeeee;
}

.profile-preview-small__avatar--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 12px;
}

.profile-preview-small__name {
    font-weight: 700;
    font-size: 18px;
}

.profile-preview-small__username {
    color: #888888;
    font-size: 14px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 18px;
}

.link-add-form {
    margin-top: 12px;
}

.link-manage-list {
    display: grid;
    gap: 12px;
}

.link-manage-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    background: #ffffff;
}

.link-manage-card.is-hidden {
    opacity: 0.55;
}

.link-manage-card__title {
    font-weight: 700;
    font-size: 16px;
}

.link-manage-card__platform {
    margin-top: 2px;
    color: #888888;
    font-size: 13px;
}

.link-manage-card__url {
    margin-top: 6px;
    font-size: 13px;
    word-break: break-all;
    color: #3366cc;
}

.link-manage-card__description {
    margin-top: 6px;
    color: #666666;
    font-size: 14px;
}

.link-manage-card__status {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #666666;
    font-size: 12px;
}

.link-manage-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-button {
    display: inline-block;
    border: none;
    background: #eeeeee;
    color: #333333;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.mini-button:hover {
    background: #dddddd;
}

.mini-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mini-button-danger {
    background: #ffecec;
    color: #b00020;
}

.mini-button-danger:hover {
    background: #ffd6d6;
}

.link-edit-form {
    display: grid;
    gap: 10px;
}

.link-edit-form .form-group {
    margin-bottom: 4px;
}

.theme-grid {
    display: grid;
    gap: 18px;
}

.theme-card {
    border: 1px solid #eeeeee;
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
}

.theme-preview {
    position: relative;
    padding: 18px;
    border: 1px solid #eeeeee;
    min-height: 190px;
}

.theme-preview__profile {
    padding: 18px 14px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.theme-preview__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eeeeee;
    margin: 0 auto 8px;
}

.theme-preview__name {
    font-size: 15px;
    line-height: 1.3;
}

.theme-preview__id {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

.theme-preview__link {
    padding: 14px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

.theme-preview__accent {
    width: 44px;
    height: 6px;
    border-radius: 999px;
    margin: 14px auto 0;
}

.theme-card__name {
    margin: 14px 0;
    font-weight: 700;
    text-align: center;
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 20px;
}

.preview-frame {
    border-radius: 24px;
    padding: 24px 12px;
    border: 1px solid #eeeeee;
}

.preview-phone {
    max-width: 390px;
    margin: 0 auto;
}

.preview-profile-card {
    padding: 24px 18px;
    text-align: center;
    margin-bottom: 16px;
}

.preview-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #eeeeee;
    margin-bottom: 12px;
}

.preview-avatar-empty {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #eeeeee;
    color: #999999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 13px;
}

.preview-name {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 4px;
}

.preview-username {
    font-size: 14px;
    margin-bottom: 12px;
}

.preview-bio {
    white-space: pre-line;
    text-align: left;
    font-size: 14px;
}

.preview-links {
    display: grid;
    gap: 12px;
}

.preview-link-card {
    display: block;
    padding: 16px 18px;
    text-align: center;
}

.preview-link-title {
    font-weight: 700;
    font-size: 16px;
}

.preview-link-description {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.75;
}

.preview-empty {
    text-align: center;
    color: #888888;
    font-size: 14px;
    padding: 20px 0;
}

.account-info {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.account-info__row {
    padding: 12px 14px;
    background: #fafafa;
    border-radius: 12px;
}

.account-info__label {
    color: #888888;
    font-size: 13px;
    margin-bottom: 3px;
}

.account-info__value {
    font-weight: 600;
    word-break: break-all;
}

.divider {
    border: none;
    border-top: 1px solid #eeeeee;
    margin: 24px 0;
}

.admin-stats {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: #fafafa;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.admin-stat-card__label {
    color: #888888;
    font-size: 13px;
}

.admin-stat-card__number {
    font-size: 26px;
    font-weight: 700;
}

.table-scroll {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #eeeeee;
    padding: 10px;
    text-align: left;
    font-size: 13px;
}

.admin-table th {
    background: #fafafa;
    font-weight: 700;
}

.admin-table-users {
    min-width: 620px;
}

.admin-table-users th,
.admin-table-users td {
    vertical-align: middle;
}

.admin-table-users th:nth-child(1),
.admin-table-users td:nth-child(1) {
    width: 50px;
}

.admin-table-users th:nth-child(3),
.admin-table-users td:nth-child(3),
.admin-table-users th:nth-child(4),
.admin-table-users td:nth-child(4) {
    width: 80px;
}

.admin-table-users th:nth-child(5),
.admin-table-users td:nth-child(5) {
    width: 100px;
}

.admin-table-users th:nth-child(6),
.admin-table-users td:nth-child(6),
.admin-table-users th:nth-child(7),
.admin-table-users td:nth-child(7) {
    width: 80px;
}

.admin-user-cell__username {
    font-weight: 700;
}

.admin-user-cell__name {
    margin-top: 3px;
    color: #666666;
    font-size: 13px;
    word-break: break-word;
}

.contact-admin-list {
    display: grid;
    gap: 14px;
}

.contact-admin-card {
    border: 1px solid #eeeeee;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.contact-admin-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.contact-status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f1f1;
    font-size: 12px;
    white-space: nowrap;
}

.contact-admin-card__message {
    margin: 12px 0;
    padding: 12px;
    background: #fafafa;
    border-radius: 10px;
}

.contact-status-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.status-badge-active {
    background: #ecfff1;
    color: #147a35;
}

.status-badge-suspended {
    background: #fff3cd;
    color: #856404;
}

.status-badge-deleted {
    background: #ffecec;
    color: #b00020;
}

.admin-detail-box {
    padding: 14px;
    background: #fafafa;
    border-radius: 12px;
    font-size: 14px;
}

.admin-detail-link-list {
    display: grid;
    gap: 12px;
}

.admin-detail-link-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    background: #ffffff;
}

@media (min-width: 700px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .site-header__inner {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .main {
        padding: 20px 14px;
    }

    .card {
        padding: 18px;
    }

    .page-title {
        font-size: 22px;
    }
}

.preview-link-inner,
.public-link-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-link-icon,
.public-link-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.preview-link-text,
.public-link-text {
    flex: 1;
    text-align: center;
}

.admin-search-form {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-search-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.pagination__item {
    display: inline-block;
    min-width: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eeeeee;
    text-align: center;
    font-size: 13px;
}

.pagination__item:hover {
    background: #dddddd;
}

.pagination__item.is-current {
    background: #ff4a2b;
    color: #ffffff;
    font-weight: 700;
}

.pagination__dots {
    color: #888888;
    padding: 0 4px;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.link-click-count {
    margin-top: 6px;
    font-size: 12px;
    color: #888888;
}

.platform-select-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.platform-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.15s;
}

.platform-option:hover {
    border-color: #ff4a2b;
    background: #fff8f5;
}

.platform-option input {
    display: none;
}

.platform-option:has(input:checked) {
    border-color: #ff4a2b;
    background: #fff5f2;
    box-shadow: 0 0 0 2px rgba(255, 74, 43, 0.12);
}

.platform-option__icon,
.link-card__platform-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f3f3f3;
}

.platform-option__icon--fallback,
.link-card__platform-icon--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
}

.platform-option__icon--empty,
.link-card__platform-icon--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    background: #eeeeee;
    font-weight: 700;
}

.platform-option__name {
    font-size: 14px;
    font-weight: 600;
}

.link-card__main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.link-card__icon-area {
    flex-shrink: 0;
}

.link-card__content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 600px) {
    .platform-select-grid {
        grid-template-columns: 1fr;
    }
}

.preview-link-icon,
.public-link-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.link-card__platform-icon-fa {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    font-size: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.platform-option__icon-fa {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    font-size: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-stats {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.dashboard-stat-card {
    padding: 16px;
    border-radius: 14px;
    background: #fafafa;
    text-align: center;
}

.dashboard-stat-card__label {
    color: #888888;
    font-size: 13px;
}

.dashboard-stat-card__number {
    font-size: 26px;
    font-weight: 700;
}

@media (min-width: 700px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.analytics-list,
.analytics-link-list {
    display: grid;
    gap: 10px;
}

.analytics-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fafafa;
}

.analytics-row__label {
    font-weight: 600;
}

.analytics-row__value {
    font-weight: 700;
}

.analytics-link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    background: #ffffff;
}

.analytics-link-card__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.analytics-link-card__icon {
    width: 32px;
    height: 32px;
    font-size: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.analytics-link-card__title {
    font-weight: 700;
    word-break: break-word;
}

.analytics-link-card__count {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.analytics-link-card__count span {
    display: block;
    color: #888888;
    font-size: 12px;
    font-weight: 500;
}

.background-preview-box {
    margin-bottom: 12px;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f1f1;
}

.background-preview-image {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
}

.background-upload-form {
    margin-bottom: 20px;
}

/* links.php UI improvement */

.links-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.links-page-head .page-title {
    margin-bottom: 4px;
}

.link-add-panel {
    margin-bottom: 18px;
}

.link-add-panel__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.link-add-panel__summary::-webkit-details-marker {
    display: none;
}

.link-add-panel__hint {
    color: #888888;
    font-size: 12px;
    font-weight: 500;
}

.links-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.links-section-head .section-title {
    margin-bottom: 4px;
}

.links-empty {
    padding: 28px 16px;
    text-align: center;
    background: #fafafa;
    border-radius: 16px;
}

.links-empty__icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    font-size: 22px;
}

.links-empty__title {
    margin: 0 0 6px;
    font-weight: 700;
}

.links-list {
    display: grid;
    gap: 14px;
}

.link-card {
    position: relative;
    border: 1px solid #eeeeee;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    transition: 0.15s ease;
}

.link-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.link-card.is-hidden {
    opacity: 0.58;
    background: #fafafa;
}

.link-card__main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.link-card__number {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #777777;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.link-card__icon-area {
    flex-shrink: 0;
}

.link-card__platform-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-card__platform-icon-fa {
    display: block;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
}

.link-card__content {
    flex: 1;
    min-width: 0;
}

.link-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.link-card__title {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.4;
    word-break: break-word;
}

.link-card__platform {
    margin-top: 2px;
    color: #888888;
    font-size: 12px;
}

.link-card__url {
    display: inline-block;
    max-width: 100%;
    margin-top: 8px;
    color: #3366cc;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-card__url:hover {
    text-decoration: underline;
}

.link-card__description {
    margin-top: 8px;
    padding: 9px 10px;
    background: #fafafa;
    border-radius: 10px;
    color: #666666;
    font-size: 13px;
    word-break: break-word;
}

.link-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.link-card__status.is-visible {
    background: #ecfff1;
    color: #147a35;
}

.link-card__status.is-private {
    background: #fff3cd;
    color: #856404;
}

.link-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #888888;
    font-size: 12px;
}

.link-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eeeeee;
}

.link-card__action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 600px) {
    .links-page-head {
        flex-direction: column;
    }

    .link-add-panel__summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .link-card {
        padding: 14px;
    }

    .link-card__main {
        gap: 10px;
    }

    .link-card__number {
        display: none;
    }

    .link-card__platform-icon-box {
        width: 38px;
        height: 38px;
    }

    .link-card__platform-icon-fa {
        font-size: 22px;
        line-height: 1;
    }

    .link-card__top {
        flex-direction: column;
        gap: 8px;
    }

    .link-card__actions {
        display: grid;
    }

    .link-card__action-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .link-card__action-group .mini-button,
    .link-card__action-group form,
    .link-card__action-group button {
        width: 100%;
        text-align: center;
    }
}

/* link_edit.php UI improvement */

.link-edit-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.link-edit-page-head .page-title {
    margin-bottom: 4px;
}

.link-edit-current-card {
    margin-bottom: 18px;
}

.link-edit-current-card__main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.link-edit-current-card__content {
    flex: 1;
    min-width: 0;
}

.link-edit-current-card__label {
    margin-bottom: 4px;
    color: #888888;
    font-size: 12px;
    font-weight: 600;
}

.link-edit-current-card__title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    word-break: break-word;
}

.link-edit-current-card__platform {
    margin-top: 2px;
    color: #888888;
    font-size: 12px;
}

.link-edit-current-card__url {
    display: inline-block;
    max-width: 100%;
    margin-top: 8px;
    color: #3366cc;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-edit-current-card__url:hover {
    text-decoration: underline;
}

.link-edit-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .link-edit-page-head {
        flex-direction: column;
    }

    .link-edit-actions {
        display: grid;
    }

    .link-edit-actions .button,
    .link-edit-actions .mini-button {
        width: 100%;
        text-align: center;
    }
}

/* platform option icon box fix */

.platform-option__icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.platform-option__icon-box .platform-option__icon-fa,
.platform-option__icon-fa {
    display: block;
    width: auto;
    height: auto;
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
}

@media (max-width: 600px) {
    .platform-option__icon-box {
        width: 34px;
        height: 34px;
    }

    .platform-option__icon-box .platform-option__icon-fa,
    .platform-option__icon-fa {
        font-size: 22px;
        line-height: 1;
    }
}

/* analytics.php graph UI */

.analytics-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.analytics-page-head .page-title {
    margin-bottom: 4px;
}

.analytics-summary-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.analytics-summary-card {
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    text-align: center;
}

.analytics-summary-card__label {
    color: #888888;
    font-size: 13px;
}

.analytics-summary-card__number {
    margin-top: 4px;
    font-size: 28px;
    font-weight: 800;
}

.analytics-card {
    margin-bottom: 18px;
}

.analytics-section-head {
    margin-bottom: 14px;
}

.analytics-section-head .section-title {
    margin-bottom: 4px;
}

.analytics-chart-box {
    position: relative;
    height: 280px;
    margin: 18px 0;
    padding: 12px;
    border-radius: 16px;
    background: #fafafa;
}

.analytics-empty {
    padding: 24px 16px;
    border-radius: 16px;
    background: #fafafa;
    color: #888888;
    text-align: center;
    font-size: 14px;
}

@media (min-width: 700px) {
    .analytics-summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .analytics-page-head {
        flex-direction: column;
    }

    .analytics-chart-box {
        height: 240px;
    }

    .analytics-summary-card__number {
        font-size: 24px;
    }
}


/* preview.php visual improvement */

.preview-frame {
    position: relative;
    overflow: hidden;
}

.preview-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: none;
}

.preview-phone {
    position: relative;
    z-index: 1;
}

.preview-profile-card,
.preview-link-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.35);
}

.preview-profile-card {
    animation: fadeUp 0.35s ease both;
}

.preview-link-card {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.preview-link-card:hover {
    transform: translateY(-2px);
    opacity: 0.94;
}

.preview-avatar,
.preview-avatar-empty {
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* admin logs */

.admin-log-card {
    margin-top: 18px;
}

.admin-log-card__head,
.admin-log-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-log-card__head .section-title,
.admin-log-page-head .page-title {
    margin-bottom: 4px;
}

.admin-log-list {
    display: grid;
    gap: 12px;
}

.admin-log-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    background: #ffffff;
}

.admin-log-item--large {
    display: block;
}

.admin-log-item__main {
    min-width: 0;
}

.admin-log-item__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.admin-log-item__date {
    color: #888888;
    font-size: 12px;
    white-space: nowrap;
}

.admin-log-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #666666;
    font-size: 12px;
    white-space: nowrap;
}

.admin-log-badge-user_suspend {
    background: #fff3cd;
    color: #856404;
}

.admin-log-badge-user_activate {
    background: #ecfff1;
    color: #147a35;
}

.admin-log-badge-user_delete {
    background: #ffecec;
    color: #b00020;
}

@media (max-width: 600px) {
    .admin-log-card__head,
    .admin-log-page-head,
    .admin-log-item {
        flex-direction: column;
    }

    .admin-log-item__date {
        white-space: normal;
    }
}


/* legal pages */

.legal-page {
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 24px;
}

.legal-section p {
    margin: 0 0 12px;
}

.legal-list {
    margin: 10px 0 0;
    padding-left: 1.4em;
}

.legal-list li {
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .legal-page {
        font-size: 14px;
    }

    .legal-section {
        margin-bottom: 22px;
    }
}

/* delete account */

.button-danger {
    background: #b00020;
}

.button-danger:hover {
    background: #8f001a;
}

.danger-zone {
    margin-top: 8px;
}

.danger-zone__title {
    color: #b00020;
}

.danger-zone__box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #ffd6d6;
    border-radius: 14px;
    background: #fffafa;
}

.danger-zone__list {
    margin: 10px 0 20px;
    padding-left: 1.4em;
}

.danger-zone__list li {
    margin-bottom: 6px;
}

.delete-account-form {
    margin-top: 18px;
}

@media (max-width: 600px) {
    .danger-zone__box {
        align-items: flex-start;
        flex-direction: column;
    }

    .danger-zone__box .mini-button {
        width: 100%;
        text-align: center;
    }
}

/* error pages */

.error-page-card {
    text-align: center;
    padding: 48px 24px;
}

.error-page-code {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    color: #ff4a2b;
    margin-bottom: 18px;
}

.error-page-title {
    margin-bottom: 12px;
}

.error-page-text {
    color: #666666;
    line-height: 1.8;
    margin-bottom: 24px;
}

.error-page-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 600px) {
    .error-page-card {
        padding: 40px 18px;
    }

    .error-page-code {
        font-size: 56px;
    }

    .error-page-actions {
        display: grid;
    }

    .error-page-actions .button,
    .error-page-actions .mini-button {
        width: 100%;
        text-align: center;
    }
}

/* home page */

.home-hero {
    display: grid;
    gap: 28px;
    align-items: center;
    padding: 28px 0 36px;
}

.home-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff5f2;
    color: #ff4a2b;
    font-size: 13px;
    font-weight: 700;
}

.home-title {
    margin: 0 0 16px;
    font-size: 40px;
    line-height: 1.25;
    letter-spacing: -0.04em;
}

.home-lead {
    margin: 0;
    color: #666666;
    font-size: 16px;
    line-height: 1.9;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.home-preview {
    display: flex;
    justify-content: center;
}

.home-preview__phone {
    width: 100%;
    max-width: 320px;
    padding: 26px 18px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, #ffe0d8, transparent 34%),
        linear-gradient(180deg, #ffffff, #fff8f5);
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
    text-align: center;
}

.home-preview__avatar {
    display: block;
    width: 78px;
    height: 78px;
    margin: 0 auto 12px;
    border-radius: 50%;
    object-fit: cover;
    background: #eeeeee;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.home-preview__name {
    font-weight: 800;
    font-size: 18px;
}

.home-preview__id {
    margin-bottom: 18px;
    color: #ff4a2b;
    font-size: 13px;
}

.home-preview__link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    font-weight: 700;
}

.home-preview__link i {
    width: 24px;
    text-align: center;
    color: #ff4a2b;
    font-size: 20px;
}

.home-section {
    margin-top: 24px;
}

.home-section-title {
    margin: 0 0 18px;
    text-align: center;
    font-size: 24px;
}

.home-feature-grid {
    display: grid;
    gap: 14px;
}

.home-feature-card {
    padding: 20px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.home-feature-card__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: #fff5f2;
    color: #ff4a2b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.home-feature-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.home-feature-card p {
    margin: 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.8;
}

.home-cta {
    margin-top: 28px;
    padding: 28px 20px;
    border-radius: 22px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.home-cta h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.home-cta p {
    margin: 0 0 18px;
    color: #666666;
}

@media (min-width: 800px) {
    .home-hero {
        grid-template-columns: 1.05fr 0.95fr;
        padding: 46px 0 52px;
    }

    .home-title {
        font-size: 48px;
    }

    .home-feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .home-title {
        font-size: 32px;
    }

    .home-actions {
        display: grid;
    }

    .home-actions .button,
    .home-actions .mini-button {
        width: 100%;
        text-align: center;
    }

    .home-preview__phone {
        max-width: 300px;
    }
}

/* footer links */

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
    font-size: 13px;
}

.footer-links a {
    color: #666666;
    transition: 0.15s ease;
}

.footer-links a:hover {
    color: #ff4a2b;
}

@media (max-width: 600px) {
    .footer-links {
        gap: 10px;
        font-size: 12px;
    }
}

/* platform image icons */

.platform-option__icon-image,
.link-card__platform-icon-image,
.link-card__favicon {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 7px;
}

.preview-link-platform-image,
.preview-link-favicon,
.public-link-platform-image,
.public-link-favicon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.72);
    padding: 3px;
}
