* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;

    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}

.card {
    width: 100%;
    max-width: 450px;

    background: #fff;

    border-radius: 16px;

    padding: 30px;

    box-shadow: 0 8px 25px rgba(0,0,0,.1);
}

.logo{
    text-align:center;
    margin-bottom:24px;
}

.logo h1{
    font-size:34px;
    margin-bottom:4px;
}

.logo p{
    color:#6b7280;
    font-size:15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

input,
select,
textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 10px;

    font-size: 15px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0d6efd;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    width: 100%;

    border: none;

    background: #0d6efd;
    color: white;

    padding: 14px;

    border-radius: 10px;

    font-size: 16px;

    cursor: pointer;

    transition: .25s;
}

button:hover {
    background: #0b5ed7;
}

button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.link {
    text-align: center;
    margin-top: 15px;
}

.link a {
    text-decoration: none;
    color: #0d6efd;
}

.link a:hover {
    text-decoration: underline;
}

/* PROFILE */

.profile-photo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 16px auto;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.photo-hint {
    margin-top: 10px;
    color: #777;
    font-size: 13px;
}

.player-summary {
    text-align: center;
    margin-bottom: 25px;
}

.player-summary h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.player-summary span {
    color: #666;
}

.readonly-field {
    background: #f7f7f7;
}

.logout-btn {
    margin-top: 10px;
    background: #dc3545;
}

.logout-btn:hover {
    background: #bb2d3b;
}

@media(max-width:768px) {

    .card {
        padding: 22px;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }
}

.secondary-btn,
.logout-btn {
    margin-top: 10px;
}

.secondary-btn {
    background: #6c757d;
}

.secondary-btn:hover {
    background: #5c636a;
}


.request-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.request-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.approve-btn {
    background: #1f6feb;
    color: white;
}

.reject-btn {
    background: #dc3545;
    color: white;
}



.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}


.group-card::before{
    content:"";
    position:absolute;
    left:0;
    top:0;

    width:100%;
    height:5px;

    border-radius:18px 18px 0 0;

    background:linear-gradient(
        90deg,
        #16a34a,
        #22c55e
    );
}

.group-card{
    position:relative;
    background:#fff;
    border-radius:18px;
    padding:18px;
    margin-bottom:14px;
    text-align:center;

    border:1px solid #ececec;

    box-shadow:
        0 6px 18px rgba(0,0,0,.06);

    transition:.2s;
}


.group-title{
    font-size:24px;
    font-weight:800;
    color:#1d4ed8;

    margin-top:4px;
    margin-bottom:12px;

    letter-spacing:-0.5px;
}


.group-card:hover{
    transform:translateY(-2px);
}


#searchText{
    height:48px;
    border-radius:14px;
    border:1px solid #d1d5db;
    padding:0 16px;
    font-size:15px;
}

#searchText:focus{
    border-color:#2563eb;
    box-shadow:
        0 0 0 4px rgba(37,99,235,.12);
}


#toggleCreateGroupBtn{
    background:
        linear-gradient(
            135deg,
            #16a34a,
            #22c55e
        );
}

#toggleCreateGroupBtn:hover{
    opacity:.95;
}


.section-divider{
    margin:22px 0;
    border:none;
    border-top:1px solid #e5e7eb;
}

.section-title{
    text-align:center;
    margin-bottom:14px;
    color:#1f2937;
}

.search-results{
    margin-top:15px;
}

#searchText{
    height:48px;
    border-radius:14px;
    border:1px solid #d1d5db;
    padding:0 16px;
    font-size:15px;
}

#searchText:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

#toggleCreateGroupBtn{
    background:linear-gradient(
        135deg,
        #16a34a,
        #22c55e
    );
}

.group-title{
    font-size:24px;
    font-weight:800;
    color:#1d4ed8;
    margin:6px 0 12px;
}

.group-icon{
    font-size:42px;
    margin-bottom:4px;
}


.search-group-card{
    background:#fff;
    border-radius:18px;
    padding:18px;
    margin:12px 0;

    text-align:center;

    border:1px solid #ececec;

    box-shadow:
        0 6px 18px rgba(0,0,0,.06);
}

.join-btn{
    width:100%;
    margin-top:14px;

    padding:12px;

    border:none;

    border-radius:12px;

    background:linear-gradient(
        135deg,
        #16a34a,
        #22c55e
    );

    color:white;
    font-weight:600;
}



.group-icon{
    font-size:42px;
    margin-bottom:4px;
}



.group-info-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;

    padding: 12px;
    margin-bottom: 10px;
}

.loading-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
}


/* =========================
   Bottom Navigation
   ========================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    height: 70px;

    background: #ffffff;
    border-top: 1px solid #e5e7eb;

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 1000;

    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    text-decoration: none;
    color: #6b7280;

    font-size: 12px;
    font-weight: 500;

    transition: 0.2s;
}

.nav-icon {
    font-size: 22px;
}

.nav-item.active {
    color: #22c55e;
}

.nav-item:hover {
    color: #22c55e;
}

/* Alt menu içerikleri kapatmasın */
body {
    padding-bottom: 90px;
}


.rating-card{
    background:#fff;
    border:1px solid #ddd;
    border-radius:12px;
    padding:15px;
    margin-bottom:15px;
}

.player-name{
    font-size:18px;
    font-weight:700;
    margin-bottom:15px;
}

.rating-line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:12px 0;
}

.star-rating{
    display:flex;
    gap:3px;
}

.star{
    font-size:28px;
    cursor:pointer;
    color:#d1d5db;
    transition:.2s;
}

.star.active{
    color:#fbbf24;
}


.match-card {
    margin-top: 15px;
}

.match-card-header h3 {
    margin: 0;
    font-size: 18px;
}

.match-card-header p {
    margin: 6px 0 15px 0;
    color: #666;
    font-size: 14px;
}

.match-btn {
    width: 100%;
    height: 46px;
    font-size: 16px;
    font-weight: 600;
}






.match-player-card {
    display: flex;
    align-items: center;
    gap: 14px;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;

    padding: 16px;
    margin-bottom: 10px;

    cursor: pointer;
    transition: all .2s ease;
}

.match-player-card.selected {
    border-color: #22c55e;
    background: #f0fdf4;
}

.player-check {
    width: 24px;
    height: 24px;

    border: 2px solid #cbd5e1;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 14px;
    font-weight: bold;
    color: white;
}

.match-player-card.selected .player-check {
    background: #22c55e;
    border-color: #22c55e;
}

.player-name {
    font-size: 16px;
    font-weight: 600;
}



.match-actions {
    position: sticky;
    bottom: 15px;

    margin-top: 20px;
}

#generateTeamsBtn {
    width: 100%;
    height: 52px;

    font-size: 17px;
    font-weight: 700;

    border-radius: 12px;
}

#selectedCount {
    position: sticky;
    top: 10px;

    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    padding: 12px 16px;
    margin-bottom: 15px;

    font-weight: 600;
    font-size: 15px;

    z-index: 10;
}


.selected-count {
    position: sticky;
    top: 10px;
    z-index: 10;

    background: #ffffff;
    padding: 14px;
    margin-bottom: 16px;

    border-radius: 12px;

    font-weight: 700;
    text-align: center;

    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.validation-message {
    margin-top: 16px;
    margin-bottom: 16px;
}

.validation-message .warning {
    background: #fee2e2;
    color: #b91c1c;

    padding: 12px;
    border-radius: 10px;

    font-weight: 600;
}

.match-actions {
    margin-top: 20px;
}

.match-actions button {
    width: 100%;
}


.disabled-player {
    opacity: 0.5;
    background: #f5f5f5;
    cursor: not-allowed;
}

.player-status {
    font-size: 18px;
    margin-left: auto;
    padding-left: 10px;
}

.match-player-card {
    display: flex;
    align-items: center;
}

.match-player-card .player-name {
    flex: 1;
}



/* =========================
   PROFILE MOBILE FIRST
   ========================= */

.player-rating-card{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:14px;
    margin-bottom:14px;
}

.overall-rating{
    text-align:center;
    margin-bottom:14px;
    padding-bottom:14px;
    border-bottom:1px solid #e5e7eb;
}

.rating-title{
    display:block;
    color:#64748b;
    font-size:13px;
    font-weight:600;
    margin-bottom:6px;
}

.rating-value{
    display:block;
    font-size:38px;
    font-weight:800;
    color:#22c55e;
    line-height:1;
}

.rating-list{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.rating-row{
    display:flex;
    justify-content:space-between;
    align-items:center;

    background:#ffffff;

    padding:7px 12px;

    border-radius:12px;

    border:1px solid #eef2f7;

    font-size:14px;
}

.rating-row span:first-child{
    display:flex;
    align-items:center;
    gap:6px;

    font-weight:500;

    color:#374151;
}

.rating-row span:last-child{
    font-size:15px;
    font-weight:700;
    color:#111827;
}

.edit-profile-panel{
    margin-top:14px;
    padding:14px;

    background:#f8fafc;

    border:1px solid #e5e7eb;
    border-radius:18px;
}

.avatar-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:8px;
    margin-top:10px;
}

.avatar-option{
    width:100%;
    aspect-ratio:1;

    object-fit:cover;

    border-radius:50%;

    border:3px solid transparent;

    cursor:pointer;

    transition:.2s;
}

.avatar-option.selected{
    border-color:#22c55e;
    box-shadow:0 0 0 3px rgba(34,197,94,.15);
}

.secondary-btn{
    background:#0ea5e9;
}

.secondary-btn:hover{
    background:#0284c7;
}

/* Profil üst alanı */

.profile-photo-section{
    text-align:center;
    margin-bottom:18px;
}

.profile-avatar{
    width:110px;
    height:110px;

    border-radius:50%;
    object-fit:cover;

    border:4px solid #0d6efd;
}

.avatar-loader{
    width:110px;
    height:110px;

    margin:0 auto;

    border-radius:50%;

    background:#e5e7eb;

    animation:pulse 1.5s infinite;
}

@keyframes pulse{

    0%{
        opacity:.5;
    }

    50%{
        opacity:1;
    }

    100%{
        opacity:.5;
    }
}

.photo-hint{
    display:none;
}

.player-summary{
    text-align:center;
    margin-bottom:18px;
}

.player-summary h2{
    font-size:30px;
    font-weight:800;
    margin-bottom:4px;
}

.player-summary span{
    font-size:15px;
    color:#64748b;
}

/* Butonlar */

.secondary-btn,
.logout-btn{
    height:52px;
    border-radius:12px;
    font-size:16px;
    font-weight:700;
}

.profile-main-score{
    text-align:center;
    font-size:48px;
    font-weight:800;
    color:#22c55e;
    line-height:1;
    margin:10px 0;
}











.match-info-card{
    background:#ffffff;

    border-radius:18px;

    padding:18px;

    margin-bottom:16px;

    text-align:center;

    border:1px solid #ececec;

    box-shadow:
        0 6px 18px rgba(0,0,0,.06);
}

.match-date{
    font-size:15px;
    color:#4b5563;
    margin-bottom:8px;
}

.match-pitch{
    font-size:15px;
    color:#4b5563;
}

.team-card{
    background:#ffffff;

    border-radius:18px;

    padding:18px;

    margin-bottom:16px;

    border:1px solid #ececec;

    box-shadow:
        0 6px 18px rgba(0,0,0,.06);
}

.team-title{
    text-align:center;

    font-size:22px;

    font-weight:800;

    margin-bottom:15px;
}

.white-team-title{
    color:#374151;
}

.red-team-title{
    color:#dc2626;
}

.team-player{
    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:10px 0;

    border-bottom:1px solid #f3f4f6;
}

.team-player:last-child{
    border-bottom:none;
}

.player-name{
    font-weight:600;
}

.player-position{
    color:#6b7280;
    font-size:13px;
}

.match-actions{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:20px;
}

.loading-box{
    text-align:center;
    padding:20px;
}


.match-result{

    margin-top:15px;

    font-size:28px;

    font-weight:800;

    text-align:center;

    color:#16a34a;

}


.modal-overlay{

    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    background:rgba(
        0,
        0,
        0,
        .55
    );

    display:flex;

    justify-content:center;
    align-items:center;

    z-index:9999;
}

.hidden{
    display:none !important;
}

.modal-card{

    width:90%;
    max-width:360px;

    background:#fff;

    border-radius:20px;

    padding:22px;

    box-shadow:
        0 20px 40px rgba(
            0,
            0,
            0,
            .2
        );
}

.modal-card h2{

    text-align:center;

    margin-bottom:20px;
}

.modal-buttons{

    display:flex;

    gap:10px;

    margin-top:20px;
}

.modal-buttons button{

    flex:1;
}

.secondary-btn{

    background:#e5e7eb !important;
    color:#374151 !important;
}





.team-formation{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.position-row{
    display:flex;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}

.player-card{
    width:72px;
    min-height:68px;

    background:
        rgba(255,255,255,.06);

    border:1px solid
        rgba(255,255,255,.08);

    border-radius:12px;

    padding:6px;

    text-align:center;
}

.player-name{
    font-size:11px;
    font-weight:700;
    line-height:1.2;
    margin-bottom:6px;
}

.player-position{
    font-size:9px;
    color:#64748b;
    font-weight:600;
}