/* Guilds Page Styles */

.guilds-container {
    max-width: 2000px;
    margin: 40px auto;
    padding: 0 2rem 2rem 2rem;
}

/* Alert Messages */
.alert-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid #28a745;
    color: #5cb85c;
}

.alert-success i {
    color: #28a745;
    font-size: 1.2rem;
}

.alert-error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid #dc3545;
    color: #ff6b6b;
}

.alert-error i {
    color: #dc3545;
    font-size: 1.2rem;
}

/* Header */
.guilds-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
}

.guilds-header h2 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(120, 150, 180, 0.8), 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin: 0 0 1rem 0;
    letter-spacing: 3px;
}

.guilds-header h2 i {
    margin-right: 1rem;
}

.guilds-header p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 0 15px rgba(120, 150, 180, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    font-weight: 300;
}

/* Stats Cards */
.guilds-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.guilds-stats .stat-card {
    background: rgba(10, 15, 25, 0.9);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.guilds-stats .stat-card:hover {
    transform: translateY(-5px);
    border-color: #7896b4;
    box-shadow: 0 5px 20px rgba(120, 150, 180, 0.3);
}

.guilds-stats .stat-icon {
    font-size: 2.5rem;
    color: #FFD700;
    margin-bottom: 0.75rem;
}

.guilds-stats .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
    font-family: 'Cinzel', serif;
    margin-bottom: 0.5rem;
}

.guilds-stats .stat-label {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* Filters */
.guilds-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(10, 15, 25, 0.9);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(15px);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-select {
    min-width: 250px;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(120, 150, 180, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #7896b4;
    background: rgba(0, 0, 0, 0.9);
    outline: none;
    box-shadow: 0 0 15px rgba(120, 150, 180, 0.5);
}

.filter-select option {
    background: #0a0f19;
    color: #ffffff;
}

.search-wrapper-guilds {
    position: relative;
    min-width: 300px;
    flex: 1;
    max-width: 400px;
}

.search-input-guilds {
    width: 100%;
    text-transform: none;
    letter-spacing: normal;
}

.search-input-guilds::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Create Guild Button */
.btn-create-guild {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #7896b4, #5a7a94);
    border: 2px solid #7896b4;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-create-guild:hover {
    background: linear-gradient(135deg, #8ba6c4, #6a8aa4);
    border-color: #8ba6c4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(120, 150, 180, 0.4);
}

.btn-create-guild i {
    font-size: 1rem;
}

.active-wars-section {
    margin: 2.5rem 0;
    padding: 2rem;
    background: rgba(10, 15, 25, 0.8);
    border: 2px solid rgba(255, 69, 0, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(15px);
}

.active-wars-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #ff4500;
    text-align: center;
    margin: 0 0 2rem 0;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.wars-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.war-card {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(25, 35, 45, 0.95));
    border: 2px solid rgba(255, 69, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    transition: all 0.3s ease;
}

.war-card:hover {
    border-color: #ff4500;
    box-shadow: 0 10px 30px rgba(255, 69, 0, 0.4);
    transform: translateY(-5px);
}

.war-guild {
    text-align: center;
}

.war-guild-emblem {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 3px solid #ff4500;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.war-guild-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.war-guild-emblem i {
    font-size: 2.5rem;
    color: #ff4500;
}

.war-guild h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.war-kills {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff4500;
    font-family: 'Cinzel', serif;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.8);
}

.war-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.war-vs span {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff4500;
    text-shadow: 0 0 20px rgba(255, 69, 0, 1);
    letter-spacing: 3px;
}

.war-status {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff4500, #dc3545);
    border: 2px solid #ff4500;
    border-radius: 20px;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

.war-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.war-duration,
.war-goal {
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 69, 0, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: center;
}

.war-duration i,
.war-goal i {
    color: #ff4500;
    font-size: 0.75rem;
}

.war-duration span,
.war-goal span {
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 69, 0, 1);
    }
}

@media (max-width: 768px) {
    .wars-grid {
        grid-template-columns: 1fr;
    }
    
    .war-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .war-vs {
        order: 2;
    }
    
    .war-guild-right {
        order: 3;
    }
}

/* Guilds Grid Wrapper */
.guilds-grid-wrapper {
    position: relative;
    background: rgba(10, 15, 25, 0.8);
    border: 2px solid rgba(120, 150, 180, 0.4);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(15px);
}

/* Guilds Grid */
.guilds-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.2rem;
    max-width: 100%;
}

@media (min-width: 1400px) and (max-width: 1799px) {
    .guilds-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .guilds-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .guilds-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .guilds-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 599px) {
    .guilds-grid {
        grid-template-columns: 1fr;
    }
}

.guild-card {
    background: rgba(10, 15, 25, 0.9);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeInCard 0.5s ease forwards;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guild-card.fade-out {
    animation: fadeOutCard 0.3s ease forwards;
}

@keyframes fadeOutCard {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.guild-card:hover {
    transform: translateY(-5px);
    border-color: #7896b4;
    box-shadow: 0 10px 30px rgba(120, 150, 180, 0.4);
}

.guild-card-header {
    background: linear-gradient(135deg, rgba(120, 150, 180, 0.2) 0%, rgba(10, 15, 25, 0.5) 100%);
    padding: 1.5rem;
    position: relative;
    text-align: center;
    border-bottom: 2px solid rgba(120, 150, 180, 0.3);
}

.guild-emblem {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    border: 3px solid #7896b4;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.guild-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guild-emblem i {
    font-size: 2.5rem;
    color: #7896b4;
}

.guild-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #FFD700;
    border-radius: 20px;
    color: #FFD700;
    font-weight: bold;
    font-size: 0.9rem;
}

.guild-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.guild-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #ffffff;
    margin: 0;
    text-align: center;
    text-shadow: 0 0 10px rgba(120, 150, 180, 0.5);
}

.guild-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.info-item i {
    color: #7896b4;
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.guild-motd {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #7896b4;
    padding: 0.75rem;
    border-radius: 4px;
}

.guild-motd i {
    color: #7896b4;
    margin-right: 0.5rem;
}

.guild-motd p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 0.9rem;
}

.guild-stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(120, 150, 180, 0.3);
}

.mini-stat {
    text-align: center;
}

.mini-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: #7896b4;
    font-family: 'Cinzel', serif;
}

.mini-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guild-card-footer {
    padding: 0.85rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(120, 150, 180, 0.3);
}

.btn-view-guild {
    width: 100%;
    padding: 0.65rem;
    background: linear-gradient(135deg, #7896b4 0%, #5a7a94 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-view-guild:hover {
    background: linear-gradient(135deg, #8ba6c4 0%, #6a8aa4 100%);
    box-shadow: 0 5px 15px rgba(120, 150, 180, 0.4);
    transform: translateY(-2px);
}

.btn-view-guild i {
    margin-right: 0.5rem;
}

.no-guilds {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.no-guilds i {
    font-size: 5rem;
    color: #7896b4;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-guilds p {
    font-size: 1.2rem;
    margin: 0;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
}

.pagination-btn {
    background: linear-gradient(135deg, #7896b4 0%, #5a7a94 100%);
    border: 2px solid rgba(120, 150, 180, 0.6);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #8ba6c4 0%, #6a8aa4 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(120, 150, 180, 0.4);
}

.pagination-btn:disabled {
    background: rgba(120, 150, 180, 0.3);
    border-color: rgba(120, 150, 180, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
    font-family: 'Cinzel', serif;
}

.pagination-info .current-page {
    color: #7896b4;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 1200px) {
    .guilds-container {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    .guilds-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .guilds-container {
        padding: 0 1rem 1rem 1rem;
    }

    .guilds-header h2 {
        font-size: 2rem;
    }

    .guilds-header p {
        font-size: 0.9rem;
    }

    .guilds-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .guilds-filters {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .filter-select {
        min-width: unset;
        width: 100%;
    }

    .search-wrapper-guilds {
        min-width: unset;
        max-width: none;
    }

    .guilds-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .guilds-container {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }

    .guilds-header h2 {
        font-size: 1.5rem;
    }

    .guilds-stats {
        grid-template-columns: 1fr;
    }

    .guild-name {
        font-size: 1.5rem;
    }

    .guild-emblem {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 400px) {
    .guilds-container {
        padding: 0 0.5rem 0.5rem 0.5rem;
    }

    .guilds-header h2 {
        font-size: 1.3rem;
    }

    .guilds-filters {
        margin-bottom: 1.5rem !important;
    }
}
