/* ====================== VARIABLES GLOBALES ====================== */
:root {
    --color-fondo: black;
    --color-label-oscuro: white;
    --color-label-claro: white;
    --color-fondo-input: white;
    --color-texto-placeholder: gray;
    --color-texto-link: white;
    --color-link-resaltado: darkblue;
    --color-texto-input: black;
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --color-joint: blue;
    --color-pool: red;
}

/* ====================== RESET & BASE ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-fondo);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--color-fondo);
    display: flex;
    flex-direction: column;
    color: var(--color-label-claro);
    min-height: 100vh;
}

/* ====================== MENÚ SUPERIOR ====================== */
.menu-superior {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-fondo);
    color: var(--color-label-oscuro);
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 30px;
}

.menu-opciones {
    display: flex;
    list-style: none;
    margin-left: auto;
}

.menu-opciones li {
    position: relative;
    margin-right: 20px;
}

.menu-opciones a {
    color: var(--color-texto-link);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.menu-opciones a:hover {
    background-color: var(--color-link-resaltado);
    color: var(--color-label-oscuro);
    border-bottom-color: #3498db;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-fondo);
    min-width: 200px;
    list-style: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1000;
}

.menu-opciones li:hover > .submenu {
    display: block;
}

.submenu a {
    padding: 12px 15px;
    border-bottom: 1px solid #2c3e50;
    color: #ecf0f1;
}

.submenu a:hover {
    background: #34495e;
    color: white;
}
 /* Contenido principal */
.main-container {
    display: flex;
    flex: 1;
}
.contenido-principal {
    flex: 1;
    padding: 5px;
    background-color: var(--color-fondo);
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.sidebar h2 {
      margin-top: 0;
      font-size: 1rem;
      text-align: center;
      color: var(--color-label-claro);
    }
.sidebar input[type="text"] {
      width: 100%;
      padding: 10px;
      margin: 15px 0;
      border: none;
      border-radius: 4px;
      box-sizing: border-box;
      font-size: 1rem;
      background-color: var(--color-fondo-input);
}

.sidebar .buttons {
      display: flex;
      gap: 10px;
      margin-bottom: 30px;
}
.sidebar button {
      flex: 1;
      padding: 10px;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 1rem;
      transition: background-color 0.3s;
}

.sidebar button:hover {
      background-color: #16a085;
   }

/* ====================== CONTENIDO PRINCIPAL ====================== */
.main-content {
    margin-top: 60px;
    margin-left: 250px;
    padding: 20px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    transition: margin-left 0.3s ease;
    width: calc(100% - 250px);
}

.contenedor {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.usercontent {
    background-color: var(--color-fondo);
    display: flex;
    flex: 1;
}

/* ====================== JOINTS GRID ====================== */

  .joint-show-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 50px;    
    gap: 15px;
}

.joint-order-selector {
    min-width: 100px;
   color-scheme: dark;
}

.joint-container {
    max-width: 90vw;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.joint-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.joint-card {
    background: white;
    border: 2px solid white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    cursor: pointer;
}

.joint-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: yellow;
}

.joint-card-header {
    position: relative;
}
.card-content {
    padding: 20px;
}

.card-pooler {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.joint-image {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #2F085A;
    display: block;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.joint-card-title {
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 5px;
    color: #2c3e50;
}
.joint-detail-image {
    width: 400px;
    height: auto;
    background-color: lightskyblue;
    /*object-fit: scale-down;*/
}
.detail-pooler-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid #e0e0e0;
}
.joint-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: #333;
}

.joint-detail-body {
    padding: 30px;
    color:#27ae60;
    background-color: red;
}

 .joint-detail-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}
.detail-description{
    font-size: 1rem;
    margin-bottom: 10px;
    color: whitesmoke;
}

 .joint-detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.joint-info-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}
.joint-header {
    text-align:left;
    margin-bottom: 10px;
    color: white;
}

.joint-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #ffffff;
    font-weight: 700;
}
.joint-form-group {
    width: 60%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2rem;
    background-color: transparent;
}

.suggestions-new-container {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.suggestion-btn {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}
.suggestion-btn:hover {
    background-color: #e3f2fd;
    transform: translateY(-2px);
    border-color: #3498db;
}
.suggestion-btn:active {
    transform: translateY(1px);
}
.btn-number {
    background: #1a73e8;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}
.btn-text {
    flex: 1;
    color: var(--color-label-claro);
}
.btn-shortcut {
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    margin-left: 10px;
}

.joint-header p {
    color: #7f8c8d;
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
}
.pooler-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pooler-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3498db;
}

.pooler-name {
    font-weight: bold;
    color: #1a2a6c;
    margin-bottom: 3px;
}

.pooler-alias {
    color: #777;
    font-size: 0.9rem;
}

.joint-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #C9D0ECFF;
}

.joint-description,
.joint-lang {
    color: rgba(240, 240, 240, 1);
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.joint-lang {
    color: rgba(240, 240, 240, 0.7);
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.info-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #3498db;
    width: 30px;
    text-align: center;
}

.info-content {
    flex: 1;
}

.info-label {
    font-weight: 600;
    color: yellow;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: lightcyan;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: auto;
}

.action-btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn {
    padding: 3px;
    border-radius: 2px;
    border: none;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share {
    background-color: yellow;
    color: black;
}

.btn-share:hover {
    background-color: darkgoldenrod;
}

.btn-edit {
    background-color: #27ae60;
    color: white;
}
.btn-rejoint {
    background-color: yellowgreen;
    color: darkblue;
}
.btn-delete {
    background-color: red;
    color: white;
}
.btn-play {
    background-color: blue;
    color: white;
}
.btn-pause {
    background-color: lightcoral;
    color: black;
}
.btn-play:disabled {
    background-color: black;
    color: white;
}
.btn-pause:disabled {
    background-color: black;
    color: white;
}

.btn-join {
    background-color: #3498db;
    color: white;
}

.btn-join:disabled {
    background-color: rebeccapurple;
    cursor: not-allowed;
    font-size: smaller;
    font-style: italic;
}

.btn-join:hover {
    background-color: #2980b9;
}

.btn-loss {
    background-color: #e74c3c;
    color: white;
}

.btn-loss:hover {
    background-color: #c0392b;
    cursor: not-allowed;
    font-size: smaller;
    font-style: italic;
}

.btn-inpool {
    background-color: blue;
    color: white;
}

.btn-inpool:hover {
    background-color: lightblue;
}

.btn-outpool {
    background-color: lightsalmon;
    color: black;
}

.btn-outpool:hover {
    background-color: salmon;
}

.btn-info {
    background-color: #2ecc71;
    color: white;
}

.btn-info:hover {
    background-color: #27ae60;
}

.btn-move {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-move:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-move:active {
    transform: translateY(0);
}

.btn-move:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.joint-image-form {
    max-width: 50vw;
    max-height: 50vw;
}


.action-btn:nth-child(1) { background: #3498db; color: white; }
.action-btn:nth-child(2) { background: #2ecc71; color: white; }
.action-btn:nth-child(3) { background: #9b59b6; color: white; }
.action-btn:nth-child(4) { background: #e67e22; color: white; }
.action-btn:nth-child(5) { background: #e74c3c; color: white; grid-column: span 2; }

.action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Badges */
.joint-badge {
    position: absolute;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.joint-form-control, .form-select {
    padding: 0.65rem 0.85rem;
    font-size: 0.92rem;
    border-radius: 2px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s;
    width: 30vw;
    background-color: white;
    color: var(--color-texto-input);
    background-color: var(--color-fondo-input);
}

.joint-form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(106, 17, 203, 0.15);
}

.joint-badge-darkgreen { top: 115px; right: 15px; background: #154D37FF; }
.joint-badge-silver { top: 105px; left: 15px; background: #C0C0C0FF; color: black; }
.joint-badge-yellow { top: 185px; right: 15px; background: #C6EE56FF; color: black; }
.joint-badge-green { top: 155px; right: 15px; background: #26C98AFF; }
.joint-badge-blue { top: 75px; right: 15px; background: #381CB6FF; }

/* ====================== BOTONES ====================== */
.jointbutt, .poolbutt, .poolerbutt, .joinedbutt, .jointnew, .boxbutt {
    padding: 0.1rem;
    width: auto;
    height: 1.6vw;
    min-height: 24px;
    border: 3px outset transparent;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 4px;
}

.jointbutt:hover { animation: 0.3s rayito 1; }
.poolbutt:hover, .poolerbutt:hover { animation: 0.6s otiyar 1 linear; }
.joinedbutt:hover { animation: 0.3s rayito 1; }
.jointnew:hover { animation: 0.2s downup 1; }
.boxbutt:hover { animation: 0.3s stun 1; }
.boxbutt:active { animation: 0.3s rayito 1; }

.poolerbutt {
    background: transparent;
    border-color: white;
    border-bottom-style: outset;
}

.poolerbutt:hover {
    background: darkblue;
    color: yellow;
    cursor: zoom-out;
}

.jointnew, .joinedbutt {
    border-color: darkorange;
    background: transparent;
}

.jointnew:disabled, .joinedbutt:disabled {
    background: gray;
    color: black;
}

.transferbutt, .configbutt {
    padding: 6px 4px;
    border: 1px solid #995309;
    border-radius: 5px;
    font-weight: bold;
}

.transferbutt {
    background: orangered;
    color: black;
}

.transferbutt:hover {
    background-image: linear-gradient(to right, peru, orangered, peru);
}

.configbutt {
    background: #090808;
    color: #DADADC;
    border-bottom: 1px solid #DBDBDB;
    border-right: 1px solid #DBDBDB;
    border-top: 2px groove #DBDBDB;
}

.configbutt:hover {
    background-image: linear-gradient(to right, darkgray, darkgray, peru);
    color: black;
}

.transferbutt:disabled, .configbutt:disabled, .poolbutt:disabled, .boxbutt:disabled {
    background: linear-gradient(to right, white, darkgray);
    color: darkgray;
}

/* ====================== ANIMACIONES ====================== */
@keyframes rayito {
    from { background-image: linear-gradient(to right, white, darkgray, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black); }
    to { background-image: linear-gradient(to right, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, darkgray, white); }
}

@keyframes otiyar {
    from { background-image: conic-gradient(black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, darkgray, white); }
    to { background-image: conic-gradient(white, darkgray, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black); }
}

@keyframes downup {
    from { background-image: linear-gradient(to bottom, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, darkgray, white); }
    to { background-image: linear-gradient(to bottom, white, darkgray, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black); }
}

@keyframes stun {
    from { background-image: radial-gradient(black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, darkgray, white); }
    to { background-image: radial-gradient(white, darkgray, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black); }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-title, .sidebar-menu span {
        display: none;
    }
    .sidebar-menu li {
        justify-content: center;
        padding: 15px;
    }
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
    .joints-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding-left: 10px;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .menu-toggle {
        display: block;
    }
    .joints-grid {
        grid-template-columns: 1fr;
    }
    .action-buttons {
        grid-template-columns: 1fr;
    }
    .action-btn:nth-child(5) {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .joint-image {
        height: 150px;
    }
    .pooler-avatar {
        width: 50px;
        height: 50px;
    }
}

 .mnu_container {
            background-color: var(--color-fondo);
            color: var(--color-label-oscuro);
        }
        
.mnu_nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.mnu_menu {
    list-style: none;
    display: flex;
    align-items: center;
}

.mnu_item {
    position: relative;
}

.mnu_link {
    color: var(--color-texto-link);
    text-decoration: none;
    padding: 18px 20px;
    display: block;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.mnu_link:hover {
    background-color: var(--color-link-resaltado);
    color: var(--color-label-oscuro);
    border-bottom: 3px solid #3498db;
}

.mnu_submenu {
    position: absolute;
    background: white;
    width: 220px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    top: 100%;
    left: 0;
}

.mnu_item:hover .mnu_submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mnu_subitem {
    border-bottom: 1px solid #f1f1f1;
}

.mnu_sublink {
    color: var(--color-link-resaltado);
    background-color: var(--color-texto-placeholder);
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.2s ease;
}

.mnu_sublink:hover {
    background-color: var(--color-texto-link);
    color: var(--color-label-oscuro);
    padding-left: 25px;
}

.mnu_user {
    display: flex;
    align-items: center;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mnu_user:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mnu_avatar {
    width: 65px;
    height: 65px;
    border-radius: 40%;
    background-color: var(--color-fondo);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-top: 10px;
}

.mnu_divider {
    height: 20px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 10px;
}

.mnu_title {
    font-size: 16px;
    margin: 20px 0 10px;
    color: var(--color-label-oscuro);
    padding-left: 10px;
    border-left: 4px solid #3498db;
}

.mnu_code {
    background-color: var(--color-fondo);
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    overflow-x: auto;
    max-width: 1200px;
    margin: 30px auto;
}

.mnu_comment {
    color: #95a5a6;
    font-style: italic;
}

.mnu_tag {
    color: #e74c3c;
}

.mnu_attr {
    color: #3498db;
}

.mnu_value {
    color: #2ecc71;
}

@media (max-width: 992px) {
    .mnu_nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mnu_menu {
        flex-direction: column;
        width: 100%;
    }
    
    .mnu_item {
        width: 100%;
    }
    
    .mnu_submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        display: none;
        box-shadow: none;
        margin-left: 20px;
    }
    
    .mnu_item:hover .mnu_submenu {
        display: block;
    }
    
    .mnu_user-area {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 10px;
        padding-top: 10px;
    }
}
.logo-container {
    border-bottom-right-radius: 15px;
    border-top-left-radius: 15px; 
    max-width:3vw; 
}

.joint-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.joint-detail.active {
    display: flex;
}

.joint-card-image {
    width: 100%;
    height: 250px;
    object-fit: scale-down;
}

.detail-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}