:root {
    --gofrm-primary: #975BE5;
    --gofrm-primary-hover: #7F3FD6;
    --gofrm-primary-light: #F8F5FF;
    --gofrm-secondary: #0694a2;
    --gofrm-text: #1A1429;
    --gofrm-text-light: #5B5670;
    --gofrm-border: #D8CFF0;
    --gofrm-bg: #ffffff;
    --gofrm-bg-light: #F6F7FB;
    --gofrm-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --gofrm-radius: 0.5rem;
}

.gravityops-forum-archive,
.gravityops-forum-single,
.gravityops-forum-topic,
.gravityops-forum-profile {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--gofrm-text);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Breadcrumbs */
.gofrm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gofrm-primary);
}

.gofrm-header h1 {
    color: var(--gofrm-primary);
    margin: 0;
    font-size: 1.75rem;
}

.gofrm-actions {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0.5rem;
    align-items: center;
}

.gofrm-actions .button,
.gofrm-actions .gofrm-button-primary,
.gofrm-actions .gofrm-button-secondary {
    margin: 0 !important;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.gofrm-actions-placeholder {
    visibility: hidden;
}

.gofrm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gofrm-text-light);
    margin-bottom: 1rem;
}

.gofrm-breadcrumb a:hover {
    color: var(--gofrm-primary-hover);
    text-decoration: underline;
}

.gofrm-breadcrumb .sep {
    color: #cbd5e1;
}

/* Boards & Forums */
.gofrm-board-section {
    margin-bottom: 2.5rem;
    background: var(--gofrm-bg);
    border-radius: var(--gofrm-radius);
    box-shadow: var(--gofrm-shadow);
    border: 1px solid var(--gofrm-border);
    overflow: hidden;
}

.gofrm-board-title {
    background: var(--gofrm-bg-light);
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--gofrm-border);
    color: var(--gofrm-primary);
}

.gofrm-board-description {
    padding: 0.75rem 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    color: var(--gofrm-text-light);
    border-bottom: 1px solid var(--gofrm-border);
}

.gofrm-forum-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gofrm-forum-item {
    display: flex;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gofrm-border);
    transition: background 0.2s;
}

.gofrm-forum-item:last-child {
    border-bottom: none;
}

.gofrm-forum-item:hover {
    background: var(--gofrm-bg-light);
}

.gofrm-forum-icon {
    flex-shrink: 0;
    margin-right: 1.25rem;
    color: var(--gofrm-secondary);
    display: flex;
    align-items: center;
}

.gofrm-forum-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.gofrm-forum-content {
    flex-grow: 1;
}

.gofrm-forum-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.gofrm-forum-item a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gofrm-primary);
    text-decoration: none;
}

.gofrm-forum-item a:hover {
    color: var(--gofrm-primary-hover);
    text-decoration: underline;
}

.gofrm-forum-item p {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--gofrm-text-light);
}

.gofrm-topic-count {
    font-size: 0.85rem;
    background: var(--gofrm-primary-light);
    color: var(--gofrm-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-weight: 500;
}

/* Topic List Table */
.gofrm-topic-list {
    width: 100%;
    border-collapse: collapse;
    background: var(--gofrm-bg);
    border-radius: var(--gofrm-radius);
    overflow: hidden;
    box-shadow: var(--gofrm-shadow);
    border: 1px solid var(--gofrm-border);
}

.gofrm-topic-list th {
    background: var(--gofrm-bg-light);
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--gofrm-text-light);
    border-bottom: 1px solid var(--gofrm-border);
}

.gofrm-topic-list td {
    padding: 1rem;
    border-bottom: 1px solid var(--gofrm-border);
    vertical-align: middle;
}

.gofrm-topic-item:hover {
    background: var(--gofrm-bg-light);
}

.gofrm-topic-main {
    display: flex;
    flex-direction: column;
}

.gofrm-topic-title {
    font-weight: 600;
    color: var(--gofrm-primary);
    text-decoration: none;
    font-size: 1.05rem;
}

.gofrm-topic-title:hover {
    color: var(--gofrm-primary-hover);
    text-decoration: underline;
}

.gofrm-topic-meta {
    font-size: 0.8rem;
    color: var(--gofrm-text-light);
    margin-top: 0.25rem;
}

.gofrm-stats-cell {
    text-align: center;
    width: 80px;
}

.gofrm-stats-value {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
}

.gofrm-stats-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gofrm-text-light);
}

/* Forum pagination */
.gofrm-pagination {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.gofrm-pagination ul.page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
}

.gofrm-pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
}

.gofrm-pagination .page-numbers a,
.gofrm-pagination .page-numbers span {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.75rem;
    border: 1px solid var(--gofrm-border);
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #fff;
    color: var(--gofrm-text);
}

.gofrm-pagination .page-numbers.current {
    background: var(--gofrm-primary);
    color: #fff;
    border-color: var(--gofrm-primary);
}

.gofrm-pagination .page-numbers a:hover {
    background: var(--gofrm-primary-light);
    color: var(--gofrm-primary);
}

/* Profile Improvements */
.gofrm-profile-header {
    background: var(--gofrm-bg);
    border-radius: var(--gofrm-radius);
    box-shadow: var(--gofrm-shadow);
    border: 1px solid var(--gofrm-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.gofrm-profile-cover {
    height: 120px;
    background: var(--gofrm-primary);
    position: relative;
}

.gofrm-profile-info {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    margin-top: 0;
}

.gofrm-profile-avatar,
.gofrm-profile-avatar img,
.gofrm-profile-avatar .gofrm-generic-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--gofrm-bg);
    background: #f1f5f9;
    overflow: hidden;
    flex-shrink: 0;
    color: var(--gofrm-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gofrm-profile-avatar .gofrm-generic-avatar svg {
    width: 60px;
    height: 60px;
}

.gofrm-profile-details {
    margin-left: 1.5rem;
    padding-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gofrm-profile-name {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gofrm-primary);
}

.gofrm-profile-stats-grid,
.gofrm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gofrm-bg-light);
}

.gofrm-stat-card,
.gofrm-stat-item {
    background: var(--gofrm-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gofrm-border);
    text-align: center;
}

/* Buttons */
.button.gofrm-button-new-topic,
.gofrm-button-primary {
    background: var(--gofrm-primary) !important;
    color: white !important;
    border: none !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 0.375rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
    text-transform: none !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.gofrm-button-secondary {
    background: var(--gofrm-bg) !important;
    color: var(--gofrm-primary) !important;
    border: 1px solid var(--gofrm-primary) !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 0.375rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-transform: none !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.gofrm-button-secondary:hover {
    background: var(--gofrm-primary) !important;
    color: white !important;
}

.button.gofrm-button-new-topic:hover,
.gofrm-button-primary:hover {
    opacity: 0.9;
    color: white;
}

/* Utility */
.gofrm-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gofrm-tag {
    display: inline-block;
    background: var(--gofrm-primary-light);
    color: var(--gofrm-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.gofrm-tag:hover {
    background: var(--gofrm-primary);
    color: white;
}

.gofrm-hidden {
    display: none !important;
}

.gofrm-hidden-form {
    display: none;
    background: var(--gofrm-bg-light);
    padding: 2rem;
    border-radius: var(--gofrm-radius);
    border: 1px solid var(--gofrm-border);
    margin: 2rem 0;
}

/* Forum Information Stats */
.gofrm-forum-info {
    margin-top: 3rem;
    background: var(--gofrm-bg-light);
    padding: 1.5rem;
    border-radius: var(--gofrm-radius);
    border: 1px solid var(--gofrm-border);
}

.gofrm-forum-info h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--gofrm-border);
    padding-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--gofrm-text-light);
}

.gofrm-forum-info .gofrm-stats-grid {
    padding: 1.5rem 0 0;
    background: transparent;
}

/* Post and Topic Improvements */
.gofrm-moderation-controls,
.gofrm-author-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--gofrm-bg-light);
    border: 1px solid var(--gofrm-border);
    border-radius: var(--gofrm-radius);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.gofrm-moderation-controls .button,
.gofrm-author-controls .button,
.gofrm-post-actions .button {
    background: #1e293b !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.gofrm-moderation-controls .button:hover,
.gofrm-author-controls .button:hover,
.gofrm-post-actions .button:hover {
    background: #334155 !important;
    color: white !important;
}

.gofrm-moderation-controls .gofrm-button-delete,
.gofrm-author-controls .gofrm-button-delete,
.gofrm-post-actions .gofrm-button-delete {
    background: #dc2626 !important;
}

.gofrm-moderation-controls .gofrm-button-delete:hover,
.gofrm-author-controls .gofrm-button-delete:hover,
.gofrm-post-actions .gofrm-button-delete:hover {
    background: #b91c1c !important;
}

.gofrm-post {
    background: var(--gofrm-bg);
    border: 1px solid var(--gofrm-border);
    border-radius: var(--gofrm-radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--gofrm-shadow);
}

.gofrm-post-meta {
    padding: 0.75rem 1rem;
    background: var(--gofrm-bg-light);
    border-bottom: 1px solid var(--gofrm-border);
    font-size: 0.85rem;
    color: var(--gofrm-text-light);
}

.gofrm-post-content {
    padding: 1.5rem;
    flex: 1;
}

.gofrm-post-body {
    display: flex;
}

.gofrm-post-author {
    width: 150px;
    padding: 1.5rem;
    background: var(--gofrm-bg-light);
    border-right: 1px solid var(--gofrm-border);
    text-align: center;
    flex-shrink: 0;
}

.gofrm-author-avatar {
    margin-bottom: 0.75rem;
}

.gofrm-author-avatar img,
.gofrm-generic-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--gofrm-bg);
    box-shadow: 0 0 0 1px var(--gofrm-border);
    background: #f1f5f9;
    color: var(--gofrm-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.gofrm-generic-avatar svg {
    width: 40px;
    height: 40px;
}

.gofrm-author-name {
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-word;
}

@media (max-width: 600px) {
    .gofrm-post-body {
        flex-direction: column;
    }
    .gofrm-post-author {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gofrm-border);
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        text-align: left;
    }
    .gofrm-author-avatar {
        margin-bottom: 0;
        margin-right: 1rem;
    }
    .gofrm-author-avatar img {
        width: 40px;
        height: 40px;
    }
}

.gofrm-post--topic {
    border-left: 4px solid var(--gofrm-primary);
}

.gofrm-replies h2 {
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

/* Profile Improvements */
.gofrm-profile-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gofrm-profile-settings {
    grid-column: 1 / -1;
}

.gofrm-profile-list {
    list-style: none;
    margin: 0;
    background: var(--gofrm-bg);
    border-radius: var(--gofrm-radius);
    border: 1px solid var(--gofrm-border);
    box-shadow: var(--gofrm-shadow);
    padding: 1rem;
}

.gofrm-profile-list-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gofrm-border);
}

.gofrm-profile-list-item:last-child {
    border-bottom: none;
}

.gofrm-profile-list-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gofrm-forum-badge {
    background: var(--gofrm-primary-light);
    color: var(--gofrm-primary);
    padding: 0.1rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

/* Gravity Forms styling */
.gform_wrapper .gform_footer input.gform_button,
.gform_wrapper .gform_footer button.gform_button,
.gform_wrapper .gform_page_footer input.gform_next_button,
.gform_wrapper .gform_page_footer input.gform_previous_button {
    background: var(--gofrm-primary) !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    border-radius: 0.375rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-size: 1rem !important;
}

.gform_wrapper .gform_footer input.gform_button:hover {
    opacity: 0.9 !important;
}
.gofrm-readonly input,
.gofrm-readonly select,
.gofrm-readonly textarea {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.gofrm-notice {
    margin-bottom: 2rem;
    border-radius: var(--gofrm-radius);
    border-left: 4px solid;
    background: var(--gofrm-bg);
    box-shadow: var(--gofrm-shadow);
    position: relative;
    padding: 1rem 3rem 1rem 1.5rem;
}
.gofrm-notice p { margin: 0; }
.gofrm-notice-info { border-color: #5F6EEA; background: var(--gofrm-primary-light); }
.gofrm-notice-warning { border-color: var(--gofrm-primary); background: var(--gofrm-primary-light); }
.gofrm-notice-error { border-color: #E062D8; background: var(--gofrm-primary-light); }

.gofrm-notice-dismiss {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: inherit;
}

.gofrm-notice-dismiss:hover {
    opacity: 1;
}

.gofrm-notice-dismiss::before {
    content: "\D7";
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
