body {
    background-image: url('/files/images/uyelerimiz-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
}

body.mazeret-page::before {
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
    pointer-events: none;
}

body.mazeret-page .forum-background {
    position: relative;
    z-index: 1;
}

.forum-background {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding: 1rem;
}

.forum-content {
    position: relative;
    z-index: 2;
}

/* Modal Container - tek blur (performans için sadece ana kutu) */
.modal-container {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    will-change: auto;
}

.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.05) 100%);
    opacity: 0.6;
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
}

/* Sayfa başlıkları – HiJack, letter-spacing 0.02em, clamp, gradient (rehberler/formlar ile aynı tipografi) */

/* Mazeret sayfası: amber → beyaz */
body.mazeret-page .header-modal h1 {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.02em !important;
    margin: 0 !important;
    background: linear-gradient(90deg, #f59e0b 0%, #fcd34d 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* Üyelerimiz sayfası: altın → beyaz */
body.members-page:not(.mazeret-page) .header-modal h1 {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.02em !important;
    margin: 0 !important;
    background: linear-gradient(90deg, #ffd700 0%, #fef3c7 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* Header Modal - blur kaldırıldı (performans) */
.header-modal {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Stats Modal - blur kaldırıldı (performans) */
.stats-modal {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Filter Modal - blur kaldırıldı (performans) */
.filter-modal {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
}

/* Select Dropdown Styling */
select {
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    transition: all 0.3s ease;
}

select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.6);
}

select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: rgba(0, 0, 0, 0.7);
}

select option {
    background-color: #1f2937;
    color: white;
    padding: 8px 12px;
    margin: 4px 0;
    border: none;
}

select option:hover {
    background-color: #3b82f6;
    color: white;
}

select option:checked {
    background: linear-gradient(#3b82f6, #3b82f6);
    background-color: #3b82f6 !important;
    color: white;
}

/* Firefox select option styling */
select option:focus {
    background-color: #3b82f6;
    color: white;
}

/* Role Group Modal - blur kaldırıldı (kaydırma donmasını önlemek için) */
.role-group-modal {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
}

/* Member Card Modal - blur kaldırıldı (kaydırma donmasını önlemek için) */
.member-card {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    contain: layout paint;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.member-card:hover::before {
    opacity: 1;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.member-card>* {
    position: relative;
    z-index: 2;
}

/* Grid View */
.member-grid-view {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
}

.member-grid-view .grid-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.member-grid-view .list-content {
    display: none;
}

/* List View */
.member-list-view {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 12px;
    min-height: auto;
}

.member-list-view .grid-content {
    display: none;
}

.member-list-view .list-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: auto;
    padding: 12px;
}

/* Role Grid Container */
.role-grid {
    display: grid;
    gap: 16px;
    contain: layout;
}

.role-grid.flex {
    display: flex;
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
}

/* Modal Footer */
.modal-footer {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 16px 16px;
}

/* Floating Elements - animasyon hafifletildi (donma azaltmak için) */
.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    will-change: transform;
}

.floating-element:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 40%;
    left: 20%;
    animation-delay: 1s;
}

.floating-element:nth-child(3) {
    width: 3px;
    height: 3px;
    top: 60%;
    left: 30%;
    animation-delay: 2s;
}

.floating-element:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 80%;
    left: 40%;
    animation-delay: 3s;
}

.floating-element:nth-child(5) {
    width: 4px;
    height: 4px;
    top: 30%;
    left: 60%;
    animation-delay: 4s;
}

.floating-element:nth-child(6) {
    width: 7px;
    height: 7px;
    top: 70%;
    left: 70%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-12px);
        opacity: 0.9;
    }
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* List View Optimizations */
.list-content {
    min-height: 60px;
    align-items: center;
}

.list-content .flex-1 {
    overflow: hidden;
}

.list-content .flex-shrink-0 {
    flex-shrink: 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-container {
        border-radius: 16px;
        margin: 1rem;
    }

    .member-card {
        border-radius: 12px;
    }

    .member-grid-view {
        min-height: 160px;
        padding: 12px;
    }

    .member-list-view {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-height: auto;
        padding: 12px;
    }

    .member-list-view .list-content {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .member-list-view .list-content .flex-1 {
        width: 100%;
    }

    .role-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .role-grid.flex {
        flex-direction: column;
        gap: 12px;
    }

    .filter-modal {
        padding: 12px;
    }

    .filter-modal .flex-col {
        gap: 8px;
    }

    select {
        min-width: auto !important;
        width: 100%;
        font-size: 14px;
        padding: 10px 32px 10px 12px;
    }

    .header-modal {
        padding: 16px;
        margin-bottom: 16px;
    }

    .header-modal h1 {
        font-size: 2rem;
    }

    .stats-modal {
        padding: 12px;
        margin-bottom: 12px;
    }

    .stats-modal .flex {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .forum-background {
        padding: 0.5rem;
    }

    .modal-container {
        border-radius: 12px;
        padding: 12px;
    }

    .member-card {
        border-radius: 10px;
        min-height: 140px;
    }

    .member-grid-view {
        min-height: 140px;
        padding: 10px;
        gap: 8px;
    }

    .member-grid-view .grid-content {
        gap: 8px;
    }

    .member-list-view .list-content {
        gap: 6px;
        padding: 8px;
    }

    .role-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .header-modal {
        padding: 12px;
        margin-bottom: 12px;
    }

    .header-modal h1 {
        font-size: 1.5rem;
    }

    .header-modal p {
        font-size: 0.875rem;
    }

    .filter-modal {
        padding: 10px;
        margin-bottom: 10px;
    }

    select {
        min-width: auto !important;
        width: 100%;
        font-size: 13px;
        padding: 8px 28px 8px 10px;
    }

    .stats-modal {
        padding: 10px;
        margin-bottom: 10px;
    }

    .role-group-modal {
        padding: 12px;
        margin-bottom: 12px;
    }

    .role-group-modal h2 {
        font-size: 1.25rem;
    }

    /* Avatar sizes for mobile */
    .member-grid-view .w-16 {
        width: 40px !important;
        height: 40px !important;
    }

    .member-list-view .w-10 {
        width: 32px !important;
        height: 32px !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Mazeret sayfası — mobil düzen                                              */
/* -------------------------------------------------------------------------- */

body.mazeret-page {
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body.mazeret-page {
        background-attachment: scroll !important;
    }

    body.mazeret-page .forum-background {
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    }

    body.mazeret-page .mazeret-page-inner {
        padding-top: max(4.5rem, calc(env(safe-area-inset-top, 0px) + 3.25rem)) !important;
        padding-bottom: 1.5rem !important;
        gap: 1rem !important;
    }

    body.mazeret-page .modal-container {
        padding: 1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 16px;
    }

    body.mazeret-page .header-modal {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    body.mazeret-page .header-modal .text-lg {
        font-size: 0.9375rem !important;
        line-height: 1.5;
    }

    body.mazeret-page .filter-modal {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    body.mazeret-page #mazeretReason,
    body.mazeret-page #mazeretStart,
    body.mazeret-page #mazeretEnd,
    body.mazeret-page #mazeretStartTime,
    body.mazeret-page #mazeretEndTime {
        font-size: 16px;
    }

    body.mazeret-page #mazeretSubmitBtn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    body.mazeret-page .mazeret-reason-modal.flex {
        align-items: flex-end;
        justify-content: stretch;
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    }

    body.mazeret-page .mazeret-reason-modal-panel {
        width: 100%;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 1rem 1rem 0 0;
        max-height: min(92dvh, 92vh) !important;
    }
}

@media (max-width: 640px) {
    body.mazeret-page .mazeret-table-scroll {
        overflow-x: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    body.mazeret-page .mazeret-table {
        min-width: 0 !important;
        width: 100%;
        border-radius: 0.75rem;
    }

    body.mazeret-page .mazeret-table thead {
        display: none;
    }

    body.mazeret-page .mazeret-table tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        padding: 0;
        background: rgba(0, 0, 0, 0.28);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 0.75rem;
        overflow: hidden;
    }

    body.mazeret-page .mazeret-table tbody tr:last-child {
        margin-bottom: 0;
    }

    body.mazeret-page .mazeret-table tbody td {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem 0.75rem;
        padding: 0.7rem 0.85rem !important;
        text-align: right !important;
        font-size: 0.8125rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        vertical-align: middle;
    }

    body.mazeret-page .mazeret-table tbody td:last-child {
        border-bottom: none;
    }

    body.mazeret-page .mazeret-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #fcd34d;
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        flex-shrink: 0;
        text-align: left;
        max-width: 40%;
        line-height: 1.25;
    }

    body.mazeret-page .mazeret-table tbody td[colspan] {
        display: block;
        text-align: center !important;
    }

    body.mazeret-page .mazeret-table tbody td[colspan]::before {
        display: none;
        content: none;
    }

    body.mazeret-page .mazeret-table tbody td .mazeret-member-cell {
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }

    body.mazeret-page .mazeret-table tbody td[data-label="Mazeret"] .mazeret-show-reason,
    body.mazeret-page .mazeret-table tbody td[data-label="İşlem"] .mazeret-early-end,
    body.mazeret-page .mazeret-table tbody td[data-label="İşlem"] .mazeret-approve,
    body.mazeret-page .mazeret-table tbody td[data-label="İşlem"] .mazeret-reject {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    body.mazeret-page .mazeret-table tbody td[data-label="İşlem"] > div.flex {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body.mazeret-page .mazeret-page-inner {
        padding-top: max(4rem, calc(env(safe-area-inset-top, 0px) + 3rem)) !important;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    body.mazeret-page .modal-container {
        padding: 0.75rem !important;
        border-radius: 12px;
    }

    body.mazeret-page .header-modal {
        padding: 0.75rem !important;
    }
}
