/* ===== GROUP PAGE STYLES ===== */

/* Group Discovery Container */
.group-discovery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #fff;
}

.group-discovery-container h1 {
    text-align: center;
    color: #DAA520;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Action Bar */
.group-actions-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.7);
    border-radius: 10px;
    border: 1px solid #8B4513;
    flex-wrap: wrap;
}

.group-actions-bar button,
.group-actions-bar .btn {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: 2px solid #A0522D;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'MedievalSharp', serif;
}

.group-actions-bar button:hover,
.group-actions-bar .btn:hover {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    border-color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.badge {
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 5px;
}

/* Search and Filters */
.group-search-filters {
    background: rgba(0,0,0,0.7);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #8B4513;
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    background: rgba(0,0,0,0.8);
    border: 1px solid #666;
    border-radius: 6px;
    color: #fff;
    font-family: 'MedievalSharp', serif;
}

.search-bar input:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 5px rgba(218, 165, 32, 0.5);
}

.search-bar button {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: 2px solid #A0522D;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    border-color: #FFD700;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters select {
    padding: 10px;
    background: rgba(0,0,0,0.8);
    border: 1px solid #666;
    border-radius: 6px;
    color: #fff;
    font-family: 'MedievalSharp', serif;
}

.filters select:focus {
    outline: none;
    border-color: #DAA520;
}

/* Group List */
.group-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.group-card {
    background: rgba(0,0,0,0.8);
    border: 2px solid #8B4513;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.group-card:hover {
    border-color: #DAA520;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #666;
    padding-bottom: 10px;
}

.group-header h3 {
    color: #DAA520;
    margin: 0;
    font-size: 1.3em;
}

.group-level {
    color: #fff;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.group-info {
    margin-bottom: 15px;
}

.group-description {
    color: #ccc;
    margin-bottom: 10px;
    font-style: italic;
}

.group-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.group-stats span {
    color: #fff;
    font-size: 0.9em;
}

.group-requirements {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.group-requirements span {
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 12px;
}

.recruiting {
    background: rgba(0, 255, 0, 0.2);
    color: #90EE90;
}

.not-recruiting {
    background: rgba(255, 0, 0, 0.2);
    color: #FF6B6B;
}

.group-actions {
    text-align: center;
}

.group-actions button {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: 2px solid #A0522D;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.group-actions button:hover {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    border-color: #FFD700;
}

.already-member {
    color: #90EE90;
    font-weight: bold;
}

.pending {
    color: #FFD700;
    font-weight: bold;
}

.cannot-join {
    color: #FF6B6B;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    background: rgba(0,0,0,0.8);
    color: #fff;
    border: 2px solid #8B4513;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-color: #A0522D;
}

.pagination button.active {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    border-color: #FFD700;
}

/* No groups message */
.no-groups {
    text-align: center;
    color: #ccc;
    font-style: italic;
    padding: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    border: 1px dashed #666;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    margin: 5% auto;
    padding: 0;
    border: 3px solid #8B4513;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.modal-content h2 {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    padding: 20px;
    margin: 0;
    border-radius: 12px 12px 0 0;
    text-align: center;
    border-bottom: 2px solid #DAA520;
}

.modal-content .close {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
}

.modal-content .close:hover {
    color: #DAA520;
}

.modal-content form {
    padding: 30px;
    color: #fff;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #DAA520;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.7);
    border: 2px solid #666;
    border-radius: 6px;
    color: #fff;
    font-family: 'MedievalSharp', serif;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 5px rgba(218, 165, 32, 0.5);
}

.form-cost {
    background: rgba(218, 165, 32, 0.1);
    border: 2px solid #DAA520;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.form-cost p {
    margin: 0;
    color: #DAA520;
    font-weight: bold;
}

.modal-content button[type="submit"] {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: 2px solid #A0522D;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
}

.modal-content button[type="submit"]:hover {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    border-color: #FFD700;
    transform: translateY(-2px);
}

/* Request/Invite Items */
.request-item,
.invite-item {
    background: rgba(0,0,0,0.6);
    border: 1px solid #666;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-info,
.invite-info {
    flex: 1;
}

.request-info h4,
.invite-info h4 {
    color: #DAA520;
    margin: 0 0 5px 0;
}

.status-pending {
    color: #FFD700;
}

.status-approved {
    color: #90EE90;
}

.status-rejected {
    color: #FF6B6B;
}

.invite-actions {
    display: flex;
    gap: 10px;
}

.invite-actions button {
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.invite-actions button:first-child {
    background: #28a745;
    color: white;
}

.invite-actions button:first-child:hover {
    background: #218838;
}

.invite-actions button:last-child {
    background: #dc3545;
    color: white;
}

.invite-actions button:last-child:hover {
    background: #c82333;
}

/* Group Management Container */
.group-management-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #fff;
}

.group-management-container h1 {
    text-align: center;
    color: #DAA520;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Group Container */
.group-container {
    background: rgba(0,0,0,0.7);
    border: 2px solid #8B4513;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.group-container h2 {
    color: #DAA520;
    margin-bottom: 15px;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: 2px solid #A0522D;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    border-color: #FFD700;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 2px solid #666;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ccc;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: 2px solid #dc3545;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    border-color: #b21f2d;
    transform: translateY(-2px);
}

/* Search Section */
.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-family: 'MedievalSharp', serif;
}

.search-section input:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 5px rgba(218, 165, 32, 0.5);
}

/* Browse Groups */
.browse-groups {
    margin-bottom: 15px;
}

.browse-results {
    background: rgba(0,0,0,0.6);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #666;
}

.browse-results h4 {
    color: #DAA520;
    margin-bottom: 10px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: rgba(0,0,0,0.6);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: #ddd;
}

.stat-value {
    color: #DAA520;
    font-weight: bold;
    font-size: 18px;
}

/* Group Details */
.group-header {
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid #DAA520;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.group-header h3 {
    color: #DAA520;
    margin: 0 0 10px 0;
}

.group-info {
    display: flex;
    gap: 20px;
    color: #ccc;
}

.group-members {
    margin: 15px 0;
}

.group-members h4 {
    color: #DAA520;
    margin-bottom: 10px;
}

.members-list {
    background: rgba(0,0,0,0.6);
    border-radius: 6px;
    padding: 10px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

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

.member-name {
    color: #fff;
    font-weight: bold;
}

.member-role {
    color: #DAA520;
    font-style: italic;
}

.btn-kick {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-kick:hover {
    background: #c82333;
}

.group-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Active Votes */
.active-votes {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.active-votes h4 {
    color: #dc3545;
    margin-bottom: 15px;
}

.vote-item {
    background: rgba(0,0,0,0.6);
    border: 1px solid #666;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-info {
    flex: 1;
}

.vote-info span {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.countdown {
    color: #dc3545;
    font-weight: bold;
}

.vote-actions {
    display: flex;
    gap: 10px;
}

.btn-vote-yes {
    background: #28a745;
    color: white;
    border: 1px solid #28a745;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-vote-yes:hover {
    background: #218838;
}

.btn-vote-no {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-vote-no:hover {
    background: #c82333;
}

/* Invitations */
.invitations-list {
    background: rgba(0,0,0,0.6);
    border-radius: 6px;
    padding: 15px;
}

.invitation-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid #666;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invitation-info {
    flex: 1;
}

.invitation-info span {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.invitation-message {
    font-style: italic;
    color: #DAA520;
    margin-top: 10px;
}

.invitation-actions {
    display: flex;
    gap: 10px;
}

.btn-accept {
    background: #28a745;
    color: white;
    border: 1px solid #28a745;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-accept:hover {
    background: #218838;
}

.btn-decline {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-decline:hover {
    background: #c82333;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    max-width: 300px;
    word-wrap: break-word;
}

.notification-info {
    background: #17a2b8;
    border: 1px solid #138496;
}

.notification-success {
    background: #28a745;
    border: 1px solid #1e7e34;
}

.notification-error {
    background: #dc3545;
    border: 1px solid #bd2130;
}

/* Responsive Design */
@media (max-width: 768px) {
    .group-actions-bar {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .group-list {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .group-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .member-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .vote-item,
    .invitation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .vote-actions,
    .invitation-actions {
        width: 100%;
        justify-content: center;
    }
    
    .group-actions {
        flex-direction: column;
    }
}