/* Contenedor general */
#eventComments{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}

#event {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}

#mainEvent {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
    font-family: Arial, sans-serif;
    padding-top: 1%;
    padding-bottom: 1%;
}

/* Card principal del evento */
#eventInfo {
    background: var(--bg-secondary-transparent);
    width: 40%;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--color-primary);
}

#eventInfo h1 {
    color: var(--color-primary);
    margin-top: 0;
    font-size: 40px;
    text-align: center;
}

#imgEvent {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    width: 100%;
}

#imgEvent img {
    width: 50%;
    max-width: 250px;
    border-radius: 10px;
}

/* Información del evento */
#info p {
    margin: 8px 0;
    line-height: 1.4;
}

/* Rules */
#rules {
    background: var(--bg-secondary-transparent);
    width: 20%;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--color-primary);
}

#rules h2 {
    margin-top: 0;
    text-align: center;
    color: var(--color-primary);
}

/* Card de participantes */
#participants {
    background: var(--bg-secondary-transparent);
    width: 15%;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--color-primary);
    overflow-y: auto;
}

#participants h2 {
    margin-top: 0;
    text-align: center;
    color: var(--color-primary);
}

#participants ul {
    list-style: none;
    padding: 0;
}

#participants li {
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 6px;
    border: 1px solid var(--color-primary);
}

/* Botón */
#registerBtn {
    width: 100%;
    height: 6%;
    padding: 10px;
    background: var(--color-primary);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;

}

#registerBtn:hover {
    transition: 0.3s;
    box-shadow: 0 0 20px var(--color-primary);
    font-size: 17px;
}

#registerBtn[disabled] {
    background: var(--bg-main);
    border-color: var(--color-primary);
    cursor: not-allowed;
}

#registerBtn[disabled]:hover {
    transition: 0.3s;
    box-shadow: 0 0 20px var(--color-primary);
}

/* Status effects */
#registerBtn.open {
    background: linear-gradient(135deg, #1db954, #0f7f3b);
    box-shadow: 0 0 18px rgba(29, 185, 84, 0.55);
    animation: pulse-open 2.2s ease-in-out infinite;
}

#registerBtn.closed {
    background: linear-gradient(135deg, #c0392b, #7f1d1d);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

#registerBtn.closed::after {
    content: "";
    position: absolute;
    left: -15%;
    right: -15%;
    top: 50%;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(-6deg);
}

#registerBtn.started {
    background: linear-gradient(135deg, #ff8c00, #d35400);
    box-shadow: 0 0 18px rgba(255, 140, 0, 0.5);
    animation: glow-started 1.6s ease-in-out infinite;
}

#registerBtn.finished {
    background: linear-gradient(135deg, #4b5563, #1f2937);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    filter: saturate(0.6);
}

@keyframes pulse-open {
    0% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(29, 185, 84, 0.45);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 22px rgba(29, 185, 84, 0.75);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(29, 185, 84, 0.45);
    }
}

@keyframes glow-started {
    0% {
        box-shadow: 0 0 10px rgba(255, 140, 0, 0.45);
    }
    50% {
        box-shadow: 0 0 24px rgba(255, 140, 0, 0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 140, 0, 0.45);
    }
}

strong {
    font-weight: bold;
    color: var(--color-primary);
}

a {
    color: white;
    text-decoration: none;
}

.backgroundAlert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary-transparent);
    display: none;
    justify-content: center;
    align-items: center;
}

.alert {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--color-primary);
    text-align: center;
    width: 20%;
    height: 20%;
}

#buttons {
    display: flex;
    flex-direction: row;
    align-items:center;
    justify-content: space-around;
    margin-top: 20px;
    gap: 5%;
    width: 100%;
}

#locationBtn {
    width: 50%;
    height: 6%;
    padding: 10px;
    background: var(--color-primary);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#locationBtn:hover {
    transition: 0.3s;
    box-shadow: 0 0 20px var(--color-primary);
    font-size: 17px;
}

.iconButton {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

#registerForm {
    width: 50%;
}

#addComments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary-transparent);
    width: 83%;
    height: 30%;
    padding: 1%;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--color-primary);
}

#addCommentForm {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    gap: 10px;
}

h2 {
    color: var(--color-primary);
    margin-top: 0;
}

textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--color-primary);
    resize: none;
    margin-bottom: 1%;
}

.commentBtn {
    width: 30%;
    height: 40px;
    padding: 10px;
    background: var(--color-primary);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}
.commentBtn:hover {
    transition: 0.3s;
    box-shadow: 0 0 20px var(--color-primary);
    font-size: 17px;
}

#comments{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1%;
    border-radius: 12px;
}

#commentsContainer{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
}

.commentCard{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary-transparent);
    padding: 1%;
    border: 1px solid var(--color-primary);
    border-radius: 12px;
    width: 83%;
    gap: 20px;
    box-shadow: 0 4px 10px var(--color-primary);
}

.comment-text{
    width: 50%;
}

.comment-header{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
}
.comment-header img{
    width: 20%;
    height: 20%;
    border-radius: 5%;
    margin-bottom: 5px;
}

.actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.comment-btn{
    width: 100%;
    height: 30px;
    padding: 5px;
    background: var(--color-primary);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

@media (max-width: 900px) {
    #mainEvent {
        flex-direction: column;
        align-items: stretch;
    }

    #eventInfo,
    #rules,
    #participants {
        width: 90%;
    }

    #registerForm {
        width: 100%;
    }

    #buttons {
        flex-direction: column;
        gap: 12px;
    }

    #locationBtn {
        width: 100%;
    }

    #addComments,
    .commentCard {
        width: 90%;
    }

    .commentCard {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-text,
    .comment-header {
        width: 100%;
    }

    .comment-header {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
    }

    .comment-header img {
        width: 48px;
        height: 48px;
    }

    .actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .comment-btn {
        width: auto;
        min-width: 120px;
    }

    .alert {
        width: 90%;
        height: auto;
    }
}