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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
}

/* NAV */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #111111;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
}

.lang-switcher {
    display: inline-flex;
    gap: 4px;
    margin-left: 24px;
    padding-left: 20px;
    border-left: 1px solid #2a2a2c;
}

.lang-switcher a {
    margin-left: 0 !important;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #666 !important;
}

.lang-switcher a.active {
    background: #0a84ff;
    color: #fff !important;
}

.lang-switcher a:hover:not(.active) {
    color: #ccc !important;
}

/* CONTAINER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* HERO */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    color: #888;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
}

.btn-primary:hover {
    background: #e0e0e0;
}

.btn-secondary {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333;
}

.btn-secondary:hover {
    background: #222;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* STATS */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.stat-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card h3 {
    font-size: 16px;
    color: #fff;
}

/* PAGE HEADER */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
}

/* ACCOUNTS GRID */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.account-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.2s;
}

.account-card:hover {
    border-color: #444;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
}

.account-info h4 {
    font-size: 15px;
    font-weight: 600;
}

.account-info p {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.status-badge {
    font-size: 12px;
    color: #4caf50;
}

/* EMPTY STATE */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    color: #888;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* POST FORM */
.post-form {
    background: #111;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 32px;
    max-width: 700px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    padding: 14px;
    font-size: 15px;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: #555;
}

.accounts-select {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    color: #ccc;
}

.checkbox-label:hover {
    color: #fff;
}

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

/* RESULT */
.result-area {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.result-success {
    background: #0d2b0d;
    border: 1px solid #1a5c1a;
    color: #4caf50;
}

.result-error {
    background: #2b0d0d;
    border: 1px solid #5c1a1a;
    color: #f44336;
}

/* GROUPS */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.group-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.2s;
}

.group-card:hover {
    border-color: #444;
}

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

.group-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.group-meta {
    font-size: 13px;
    color: #888;
}

.group-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-prompt {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
}

.group-prompt strong {
    color: #aaa;
    display: block;
    margin-bottom: 4px;
}

.group-prompt p {
    color: #ddd;
    line-height: 1.5;
}

.group-posts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.group-posts strong {
    font-size: 13px;
    color: #aaa;
}

.post-example {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #ccc;
    border-left: 3px solid #333;
}

.last-run {
    font-size: 12px;
    color: #666;
}

.comments-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    position: relative;
}

.comments-badge {
    background: #ff453a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.group-footer {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #222;
}

/* BUTTONS EXTRA */
.btn-success {
    background: #1a4d1a;
    color: #4caf50;
    border: 1px solid #2d7a2d;
}

.btn-success:hover {
    background: #1f5c1f;
}

.btn-danger {
    background: #4d1a1a;
    color: #f44336;
    border: 1px solid #7a2d2d;
}

.btn-danger:hover {
    background: #5c1f1f;
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.input-field {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: #555;
}

select.input-field option {
    background: #1a1a1a;
    color: #fff;
}

/* UPLOAD AREA */
.upload-area {
    border: 2px dashed #333;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #555;
}

/* POSTS EXAMPLES GRID */
.posts-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.post-example-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 4px;
}

/* ACC TAGS */
.group-accounts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.acc-tag {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acc-tag-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.acc-tag-remove:hover {
    color: #f44336;
}

/* POST REMOVE */
.post-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(244, 67, 54, 0.8);
    border: none;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.post-remove-btn:hover {
    background: #f44336;
}