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

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.title-link {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.title-link:hover {
    opacity: 0.8;
    cursor: pointer;
}

.search-container {
    display: flex;
    align-items: center;
}

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

.search-input {
    padding: 10px 15px;
    border: 1px solid #2a2f4a;
    border-radius: 20px;
    background: #1a1f3a;
    color: #ffffff;
    font-size: 14px;
    width: 250px;
    max-width: 100%;
    outline: none;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #0088cc;
}

.search-button {
    background: #0088cc;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.search-button:hover {
    background: #0077b3;
}

/* Navigation */
.nav {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #2a2f4a;
    padding-bottom: 10px;
}

.nav-link {
    color: #8a8fa3;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #ffffff;
    background: #2a2f4a;
}

.nav-link.active {
    color: #ffffff;
    background: #2a2f4a;
    font-weight: 600;
}

/* Add Group Section */
.add-group-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(42, 47, 74, 0.3);
    border-radius: 12px;
}

.add-group-text {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 500;
}

.add-group-subtext {
    font-size: 14px;
    color: #b0b5c8;
    margin-bottom: 15px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.bot-link {
    display: inline-block;
    color: #0088cc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(0, 136, 204, 0.1);
    border-radius: 8px;
    transition: all 0.3s;
}

.bot-link:hover {
    background: rgba(0, 136, 204, 0.2);
    text-decoration: none;
    transform: translateY(-2px);
}

.bot-link-inline {
    color: #0088cc;
    text-decoration: none;
    font-weight: 500;
}

.bot-link-inline:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Featured Group (Detail Page) */
.featured-group {
    background: rgba(42, 47, 74, 0.5);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.featured-group-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #ffffff;
}

.featured-telegram-logo {
    width: 120px;
    height: 120px;
    background: #0088cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.telegram-icon-large {
    width: 70px;
    height: 70px;
}

.featured-group-name-repeat {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
}

.featured-member-count {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 500;
}

.open-telegram-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0088cc;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 30px;
    transition: background 0.3s;
}

.open-telegram-button:hover {
    background: #0077b3;
}

.rating-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.thumbs-button {
    background: transparent;
    border: 2px solid #2a2f4a;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    transform: scale(1);
}

.thumbs-button:hover:not(:disabled) {
    border-color: #0088cc;
    background: rgba(0, 136, 204, 0.1);
}

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

.rating-percentage {
    font-size: 24px;
    font-weight: 600;
    color: #4caf50;
}

.rating-positive {
    color: #4caf50 !important;
}

.rating-negative {
    color: #f44336 !important;
}

.rating {
    color: #4caf50;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rating-label {
    font-size: 0.85em;
    font-weight: 500;
    opacity: 0.9;
}

.rating-percentage {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.help-text {
    color: #8a8fa3;
    font-size: 14px;
    margin-bottom: 15px;
}

.report-link {
    color: #0088cc;
    text-decoration: none;
    font-size: 14px;
}

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

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.group-card {
    background: rgba(42, 47, 74, 0.5);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 136, 204, 0.3);
}

.telegram-logo-circle {
    width: 80px;
    height: 80px;
    background: #0088cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.telegram-icon {
    width: 45px;
    height: 45px;
}

.group-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
    word-wrap: break-word;
}

.group-description {
    display: none;
}

.telegram-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0088cc;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: background 0.3s;
    width: fit-content;
}

.telegram-button:hover {
    background: #0077b3;
}

.telegram-icon-small {
    width: 18px;
    height: 18px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #2a2f4a;
    font-size: 12px;
}

.rating {
    color: #4caf50;
    font-weight: 600;
}

.member-count {
    color: #8a8fa3;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 136, 204, 0.2);
    border-top-color: #0088cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator span {
    color: #8a8fa3;
    font-size: 16px;
    font-weight: 500;
}

/* Modal de Denúncia */
.report-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.report-modal-content {
    background-color: #1a1f3a;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.report-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #8a8fa3;
    cursor: pointer;
    transition: color 0.3s;
}

.report-modal-close:hover {
    color: #ffffff;
}

.report-modal-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    margin-right: 30px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    background-color: #0a0e27;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #0088cc;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #6a6f83;
}

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

.report-submit-button {
    width: 100%;
    padding: 14px;
    background-color: #f44336;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.report-submit-button:hover:not(:disabled) {
    background-color: #d32f2f;
}

.report-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        width: 100%;
        overflow-x: hidden;
    }

    body {
        padding: 15px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .title {
        font-size: 20px;
        width: 100%;
        word-wrap: break-word;
    }

    .search-container {
        width: 100%;
        box-sizing: border-box;
    }

    .search-form {
        width: 100%;
        box-sizing: border-box;
    }

    .search-input {
        width: 100%;
        max-width: 100%;
        font-size: 16px; /* Evita zoom no iOS */
        box-sizing: border-box;
    }

    .nav {
        flex-wrap: wrap;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-link {
        font-size: 14px;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .add-group-section {
        padding: 15px;
        margin-bottom: 30px;
        width: 100%;
        box-sizing: border-box;
    }

    .add-group-text {
        font-size: 16px;
        width: 100%;
        word-wrap: break-word;
    }

    .add-group-subtext {
        font-size: 13px;
        padding: 0;
        width: 100%;
        word-wrap: break-word;
        box-sizing: border-box;
    }

    .bot-link {
        font-size: 14px;
        padding: 8px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .groups-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .group-card {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .group-name {
        font-size: 16px;
        word-wrap: break-word;
        width: 100%;
    }

    .group-meta {
        font-size: 12px;
        width: 100%;
    }

    .featured-group {
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .featured-group-name {
        font-size: 20px;
    }

    .featured-telegram-logo {
        width: 100px;
        height: 100px;
    }

    .telegram-icon-large {
        width: 60px;
        height: 60px;
    }

    .featured-member-count {
        font-size: 16px;
    }

    .open-telegram-button {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
    }

    .rating-section {
        flex-wrap: wrap;
        gap: 10px;
    }

    .thumbs-button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .report-modal-content {
        padding: 20px;
        width: 95%;
        margin: 10px;
    }

    .report-modal h2 {
        font-size: 20px;
    }

    .report-form input,
    .report-form textarea,
    .report-form select {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Smartphones pequenos */
@media (max-width: 480px) {
    html {
        width: 100%;
        overflow-x: hidden;
    }

    body {
        padding: 10px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .title {
        font-size: 18px;
        width: 100%;
        word-wrap: break-word;
    }

    .add-group-text {
        font-size: 15px;
        width: 100%;
        word-wrap: break-word;
    }

    .add-group-subtext {
        font-size: 12px;
        width: 100%;
        word-wrap: break-word;
    }

    .featured-group {
        padding: 15px 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .featured-group-name {
        font-size: 18px;
    }

    .featured-telegram-logo {
        width: 80px;
        height: 80px;
    }

    .telegram-icon-large {
        width: 50px;
        height: 50px;
    }

    .group-card {
        padding: 12px;
    }

    .report-modal-content {
        padding: 15px;
        width: 98%;
    }
}

