

.profile-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; margin-top: -80px; }
}

.profile-header {
    position: relative;
    height: 300px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.profile-header::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(39, 39, 39, 1) 0%, transparent 60%);
}

.header-controls {
    position: absolute; top: 20px; right: 20px; z-index: 10; display: flex; gap: 10px;
}

.header-btn {
    background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.2);
    color: white; padding: 10px 14px; border-radius: 8px; cursor: pointer;
    transition: all 0.2s; backdrop-filter: blur(4px); font-size: 15px;
}
.header-btn:hover { background: rgba(0, 0, 0, 0.8); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-2px); }


.profile-card {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; align-items: center;
}

.profile-avatar-wrapper {
    width: 140px; height: 140px;
    margin-top: -80px; margin-bottom: 15px;
    position: relative;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.profile-avatar {
    width: 100%; height: 100%;
    border-radius: 20px; object-fit: cover;
    background-color: var(--card-bg, #1F1F1F);
}

.user-identity { margin-bottom: 20px; width: 100%; }
.profile-username-row { font-size: 24px; font-weight: 800; margin: 0; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.profile-id-badge {
    display: inline-block; font-size: 11px; color: #888;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px; border-radius: 6px;
    margin-top: 8px; font-weight: 600;
}


.mini-stats-list { width: 100%; margin-bottom: 20px; padding: 0 5px; }
.mini-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mini-stat-row:last-child { border-bottom: none; }
.ms-label { color: #888; }
.ms-label i { width: 18px; color: var(--accent-color, #2C8FFF); opacity: 0.8; text-align: center; }
.ms-value { font-weight: 600; color: var(--text-color, #fff); }


.team-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.team-action-btn {
    width: 100%; padding: 12px; border-radius: 10px; border: none;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit;
}
.team-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.team-action-btn.primary { background: var(--accent-color, #2C8FFF); color: #fff; }
.team-action-btn.primary:not(:disabled):hover { opacity: 0.9; transform: translateY(-2px); }

.team-action-btn.secondary { background: rgba(255,255,255,0.05); color: #ccc; border: 1px solid rgba(255,255,255,0.1); }
.team-action-btn.secondary:not(:disabled):hover { background: rgba(255,255,255,0.1); color: #fff; }

.team-action-btn.danger { background: rgba(231, 76, 60, 0.1); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }
.team-action-btn.danger:not(:disabled):hover { background: #e74c3c; color: #fff; }


.profile-content-col { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; }
.content-section {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 16px; padding: 25px;
}
.section-title {
    margin: 0 0 20px 0; font-size: 18px; font-weight: 700; color: var(--text-color, #fff);
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px;
    display: flex; align-items: center; gap: 10px;
}


.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.player-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px; padding: 12px;
    transition: all 0.2s; cursor: default;
}
.player-card:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--accent-color, #2C8FFF); }

.player-card-left { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.player-helm { width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; flex-shrink: 0; }

.player-info { display: flex; flex-direction: column; overflow: hidden; line-height: 1.3; }


.player-name { 
    font-size: 14px; 
    font-weight: 700; 
    text-decoration: none; 
    text-overflow: ellipsis; 
    overflow: hidden; 
    white-space: nowrap;
    display: inline-block;
    background-clip: text;
    -webkit-background-clip: text;
}
.player-name:hover { opacity: 0.8; }
.player-role { font-size: 11px; color: #888; margin-top: 2px; }
.player-role i { color: #f1c40f; margin-right: 3px; }


.kick-player-btn {
    background: rgba(231, 76, 60, 0.1); color: #e74c3c;
    border: none; border-radius: 8px;
    width: 32px; height: 32px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; font-size: 14px;
}
.kick-player-btn:hover { background: #e74c3c; color: #fff; transform: scale(1.1); }


.apps-table { width: 100%; border-collapse: collapse; }
.apps-table th {
    text-align: left; padding: 12px 10px;
    color: #888; font-size: 12px; text-transform: uppercase; font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.apps-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.02); vertical-align: middle; }
.app-player-link { display: flex; align-items: center; gap: 10px; color: var(--text-color, #fff); text-decoration: none; font-weight: 600; font-size: 14px; }
.app-player-link:hover { color: var(--accent-color, #2C8FFF); }
.app-helm { width: 28px; height: 28px; border-radius: 6px; }

.action-btn { background: none; border: none; cursor: pointer; font-size: 20px; padding: 5px; margin-left: 5px; transition: transform 0.2s; opacity: 0.8; }
.action-btn:hover { transform: scale(1.15); opacity: 1; }
.btn-accept { color: #2ecc71; }
.btn-reject { color: #e74c3c; }


.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; backdrop-filter: blur(5px);
}
.modal-content {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 20px;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header { margin-bottom: 20px; }
.modal-title { margin: 0 0 10px 0; font-size: 22px; font-weight: 800; color: var(--text-color, #fff); display: flex; align-items: center; justify-content: center; gap: 10px;}
.modal-subtitle { color: #888; font-size: 14px; margin: 0; line-height: 1.4; }

.modal-input {
    width: 100%; padding: 14px 15px; border-radius: 12px;
    border: 1px solid var(--border-color, #444);
    background: rgba(0,0,0,0.2); color: var(--text-color, #fff);
    margin-bottom: 25px; outline: none; font-size: 16px; font-family: inherit;
    transition: all 0.2s; font-weight: 600; text-align: center;
}
.modal-input:focus { border-color: var(--accent-color, #2C8FFF); background: rgba(0,0,0,0.4); box-shadow: 0 0 15px rgba(44, 143, 255, 0.2); }

.modal-buttons { display: flex; gap: 15px; }
.modal-buttons button { flex: 1; margin: 0; font-size: 15px; padding: 14px; border-radius: 12px; }


/* СВЕТЛАЯ ТЕМА */

.light-theme .profile-card, .light-theme .content-section { background: #ffffff; border-color: var(--border-light, #e0e0e0); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.light-theme .profile-avatar { background-color: #ffffff; }
.light-theme .profile-username-row, .light-theme .section-title, .light-theme .ms-value, .light-theme .app-player-link { color: #222222; }
.light-theme .app-player-link:hover { color: var(--accent-color, #2C8FFF); }
.light-theme .ms-label { color: #666666; }
.light-theme .section-title { border-bottom-color: var(--border-light, #e0e0e0); }
.light-theme .mini-stat-row { border-bottom-color: var(--border-light, #e0e0e0); }

.light-theme .player-card { background: #f8f9fa; border-color: var(--border-light, #e0e0e0); }
.light-theme .player-card:hover { background: #ffffff; border-color: var(--accent-color, #2C8FFF); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.light-theme .kick-player-btn { background: #ffeaea; color: #e74c3c; }
.light-theme .kick-player-btn:hover { background: #e74c3c; color: #fff; }

.light-theme .apps-table th { color: #555; border-bottom-color: var(--border-light, #e0e0e0); }
.light-theme .apps-table td { border-bottom-color: var(--border-light, #eee); }

.light-theme .team-action-btn.secondary { background: #f0f0f0; color: #555; border-color: var(--border-light, #e0e0e0); }
.light-theme .team-action-btn.secondary:not(:disabled):hover { background: #e4e4e4; color: #222; }
.light-theme .profile-id-badge { background: #f0f0f0; color: #555; }


.light-theme .modal-content { background: #ffffff !important; border-color: var(--border-light, #e0e0e0) !important; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
.light-theme .modal-title { color: #222 !important; }
.light-theme .modal-input { background: #f8f9fa !important; color: #222 !important; border-color: #ccc !important; }
.light-theme .modal-input:focus { border-color: var(--accent-color) !important; background: #fff !important; }

.upload-modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center; z-index: 9999;
}

.upload-modal-content {
    background: var(--card-bg, #1F1F1F);
    border: 1px solid var(--border-color, #333);
    border-radius: 20px;
    padding: 40px;
    width: 450px;
    max-width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.3s ease;
}

.close-upload-modal {
    position: absolute; top: 15px; right: 15px;
    background: transparent; border: none;
    color: #888; font-size: 20px; cursor: pointer;
    transition: 0.2s;
}

.close-upload-modal:hover {
    color: #fff; transform: scale(1.1);
}

.upload-modal-title {
    font-size: 22px; font-weight: 800;
    color: var(--text-color, #fff); margin-bottom: 10px;
}

.upload-modal-subtitle {
    color: #888; font-size: 14px; margin-bottom: 25px;
}

.drop-zone {
    border: 2px dashed var(--accent-color, #2C8FFF);
    border-radius: 15px; padding: 40px 20px;
    cursor: pointer; transition: all 0.3s ease;
    background: rgba(44, 143, 255, 0.05);
}

.drop-zone:hover, .drop-zone.dragover {
    background: rgba(44, 143, 255, 0.15);
}

.drop-zone i {
    font-size: 40px; color: var(--accent-color, #2C8FFF); margin-bottom: 15px;
}

.drop-info-main {
    font-size: 16px; font-weight: 700;
    color: var(--text-color, #fff); margin-bottom: 5px;
}

.drop-info-sub {
    font-size: 13px; color: #888;
}


.light-theme .upload-modal-content {
    background: #ffffff !important;
    border-color: var(--border-light, #e0e0e0) !important;
}
.light-theme .upload-modal-title, .light-theme .drop-info-main {
    color: #222 !important;
}
.light-theme .close-upload-modal:hover {
    color: #e74c3c;
}

.team-logs-container {
    max-height: 350px; 
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    padding: 10px;
}


.team-logs-container::-webkit-scrollbar {
    width: 6px;
}
.team-logs-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
.team-logs-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.team-logs-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4);
}

.log-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    transition: background 0.2s;
    border-radius: 8px;
}
.log-item:hover {
    background: rgba(255, 255, 255, 0.03);
}
.log-item:last-child {
    border-bottom: none;
}

.log-time {
    color: #888;
    font-family: monospace;
    font-size: 12px;
    min-width: 110px;
}

.log-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}


.log-icon.create { color: #f1c40f; } 
.log-icon.join { color: #2ecc71; }   
.log-icon.leave { color: #95a5a6; }  
.log-icon.kick { color: #e74c3c; }   
.log-icon.rename { color: #9b59b6; } 

.log-message {
    color: var(--text-color, #fff);
    flex-grow: 1;
}

.log-empty {
    padding: 30px;
    text-align: center;
    color: #888;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.log-empty i {
    font-size: 24px;
    opacity: 0.5;
}


.light-theme .team-logs-container { background: #f8f9fa; border-color: #e0e0e0; }
.light-theme .log-item { border-bottom-color: #eee; }
.light-theme .log-item:hover { background: #fff; }
.light-theme .log-message { color: #333; }

.log-highlight {
    color: var(--accent-color, #2C8FFF); 
    font-weight: 700;
}