/*!
* DefconExpanded, Created by...
* KezzaMcFezza - Main Developer
* Nexustini - Server Managment
*
* Notable Mentions...
* Rad - For helping with python scripts.
* Bert_the_turtle - Doing everthing with c++
* 
* Inspired by Sievert and Wan May
* 
* Last Edited 19-09-2025
*/

.profile-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.profile-header {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.profile-banner {
    position: relative;
    height: 200px;
    background-position: center;
    background-size: cover;
    background-color: rgba(28, 28, 46, 0.5);
}

.mod-item {
    max-width: 450px !important;
    min-width: 300px !important;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(15, 15, 25, 0.8) 100%);
}

.profile-banner-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.editing .profile-banner:hover .profile-banner-edit {
    opacity: 1;
}

.profile-info-bar {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: flex-end;
    position: relative;
    background-color: rgba(28, 28, 46, 0.3);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.profile-picture-wrapper {
    position: relative;
    margin-right: 1.5rem;
    margin-top: -70px;
    z-index: 5;
}

.profile-picture {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(28, 28, 46, 0.8);
    background-color: #1a1a1a;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-picture-edit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #4da6ff;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.editing .profile-picture-wrapper:hover .profile-picture-edit {
    opacity: 1;
}

.profile-details {
    flex-grow: 1;
}

.profile-username {
    color: #5eff00;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-bio {
    color: #b8b8b8;
    margin: 0.5rem 0 0;
    max-width: 600px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.profile-actions {
    margin-left: auto;
    align-self: center;
}

.edit-profile-btn {
    background-color: #0067b8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.edit-profile-btn:hover {
    background-color: #0078d4;
}

.edit-profile-btn.editing {
    background-color: #5eff00;
    color: #121212;
}

.profile-content {
    display: grid;
    grid-template-columns: 4fr 2fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-card {
    background-color: rgba(28, 28, 46, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: fit-content;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.profile-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0.7;
}

.profile-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-card-header i {
    color: #4da6ff;
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.profile-card-title {
    color: #4da6ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-container .profile-card {
    flex: 1;
    margin-bottom: 0;
    height: auto;
}

.social-links-card::before {
    background: linear-gradient(to right, #3d3d3d, #363636);
}

.defcon-stats-card::before {
    background: linear-gradient(to right, #3d3d3d, #363636);
}

.territory-stats-card::before {
    background: linear-gradient(to right, #3d3d3d, #363636);
}

.recent-game-card::before {
    background: linear-gradient(to right, #3d3d3d, #363636);
}

.contributions-card::before {
    background: linear-gradient(to right, #3d3d3d, #363636);
}

.favorite-mods-card::before {
    background: linear-gradient(to right, #3d3d3d, #363636);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-item {
    display: flex;
    align-items: center;
}

.social-item i {
    width: 30px;
    font-size: 1.2rem;
    color: #4da6ff;
}

.social-label {
    width: 80px;
    color: #b8b8b8;
}

.social-value {
    color: #fff;
    font-weight: 500;
}

.defcon-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #b8b8b8;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.highlight-stat {
    color: #5eff00;
}

.highlight-nemesis{
    color: #ff4949;
}

.highlight-teammate{
    color: #4da6ff;
}

.highlight-defcon-name{
    color: #ff8400;
}

.nemesis-container,
.teammate-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nemesis-record,
.teammate-record {
    font-size: 0.85rem;
    color: #b8b8b8;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.territory-select-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.territory-select-label {
    color: #4da6ff;
    margin-right: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
}

.territory-results {
    margin-bottom: 1rem;
}

.territory-result {
    color: #b8b8b8;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.territory-best {
    color: #5eff00;
    font-weight: 500;
}

.territory-worst {
    color: #ff4949;
    font-weight: 500;
}

.heatmap {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: auto;
    overflow: hidden;
}

.base-map {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

.territory-overlay-profile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 2;
    opacity: 0.7;
}

.contributions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contribution-section {
    margin-bottom: 1rem;
}

.contribution-section-title {
    color: #4da6ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.contribution-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.contribution-list li {
    color: #b8b8b8;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: rgba(28, 28, 46, 0.4);
    border-radius: 5px;
    position: relative;
    transition: background-color 0.2s ease;
}

.contribution-list li:hover {
    background-color: rgba(28, 28, 46, 0.6);
}

.editing .contribution-list li {
    padding-right: 2.5rem;
}

.delete-item-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 73, 73, 0.7);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.delete-item-btn:hover {
    background-color: rgba(255, 73, 73, 1);
}

.editing .contribution-list li:hover .delete-item-btn {
    opacity: 1;
}

.add-item-btn {
    background-color: rgba(94, 255, 0, 0.3);
    color: #5eff00;
    border: 1px dashed #5eff00;
    border-radius: 5px;
    padding: 0.5rem;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.add-item-btn:hover {
    background-color: rgba(94, 255, 0, 0.4);
}

.recent-game-container {
    margin-top: 1rem;
}

.favorite-mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: auto;
}

.modal-content {
    background-color: rgba(28, 28, 46, 0.95);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-content h2 {
    color: #4da6ff;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.image-editor-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #12121a;
}

#image-to-edit {
    position: absolute;
    max-width: none;
    transform-origin: center;
}

.crop-overlay {
    position: absolute;
    border: 2px dashed #4da6ff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 2;
}

.image-editor-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#zoom-control {
    width: 100%;
    margin: 0;
}

.button-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.button-container button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

#skip-edit {
    background-color: #333;
    color: white;
}

#cancel-edit {
    background-color: #ff4949;
    color: white;
}

#apply-edit {
    background-color: #5eff00;
    color: #121212;
}

.editable {
    position: relative;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.editing .editable {
    background-color: rgba(77, 166, 255, 0.1);
    outline: 1px dashed rgba(77, 166, 255, 0.5);
    cursor: text;
}

.editing .editable:hover,
.editing .editable:focus {
    background-color: rgba(77, 166, 255, 0.2);
    outline: 1px dashed rgba(77, 166, 255, 0.8);
}

.editing .editable::after {
    font-weight: 900;
    position: absolute;
    right: 0.25rem;
    bottom: 0.25rem;
    font-size: 0.8rem;
    color: #4da6ff;
    opacity: 0.7;
}

.profile-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
}

.profile-banner-overlay i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.profile-picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 94.5%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    color: white;
    font-size: 2rem;
}

.cropper-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    opacity: 1 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); 
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px); 
}

.cropper-modal-content {
    background-color: #1c1c2e;
    border-radius: 8px;
    width: auto; 
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.cropper-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #2c2c3e;
    background-color: #1a1a1a;
}

.cropper-modal-header h3 {
    margin: 0;
    color: #fff;
    font-weight: 500;
}

.cropper-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s ease;
}

.cropper-close-btn:hover {
    color: #fff;
}

.cropper-container {
    padding: 0;
    max-height: 80vh; 
    overflow: hidden;
    position: relative;
    background-color: #1a1a1a; 
}

.cropper-container img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
}

.cropper-modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #2c2c3e;
    background-color: #1a1a1a;
}

.cropper-modal-footer button {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#cropper-cancel-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 5px;
    text-decoration: none;
    border: 0;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
    font-weight: bold;
    background-color: #830000;
    color: #fff;
    cursor: pointer;
}

#cropper-save-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 5px;
    text-decoration: none;
    border: 0;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
    font-weight: bold;
    background-color: #0067b8;
    color: #fff;
    margin-left: 10px;
}

#cropper-cancel-btn:hover {
    background-color: rgba(170, 170, 170, 0.1);
    color: #fff;
    border-color: #fff;
}

#cropper-save-btn:hover {
    background-color: #3d96ef;
    transform: translateY(-1px);
}

.cropper-bg {
    background-image: none !important; 
    background-color: #1c1c2e !important; 
}

.cropper-modal {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.cropper-view-box {
    outline: 2px solid #4da6ff !important;
    outline-color: rgba(77, 166, 255, 0.75) !important;
}

.cropper-point {
    background-color: #4da6ff !important;
}

.cropper-line {
    background-color: #4da6ff !important;
}

.cropper-face {
    background-color: transparent !important;
}

.cropper-canvas:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: -1;
}