body {
    font-family: 'Montserrat', sans-serif; /* Override for specific element */
    background-color: #f5f5f5;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px;
}

h1 {
    font-family: 'Montserrat', sans-serif; /* Override for specific element */
    color: #0073e6;
}

h2 {
    font-family: 'Montserrat', sans-serif; /* Override for specific element */
    margin-bottom: 40px;
}

.candidates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.candidate {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    width: 30%;
    margin-bottom: 20px;
    padding: 30px;
    box-sizing: border-box;
    margin: 10px;
    flex: 1 1 calc(100% - 20px); /* Default to full width */
    max-width: 300px; /* Optional: Limit the max width of each card */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Add transition for smooth effect */
    animation: moveVertical 10s infinite; /* Apply the animation */
}

/* Hover effect */
.candidate:hover {
    transform: scale(1.05); /* Scale up the card */
    box-shadow: 0 0 50px rgba(0, 0, 255, 0.3); /* Blue shadow for emphasis */
}


@keyframes moveVertical {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px); /* Move down by 20px */
    }
    100% {
        transform: translateY(0); /* Return to original position */
    }
}


 @media (min-width: 600px) {
    .candidate {
/*      flex: 1 1 calc(33.333% - 20px); */
      /* 3 cards per row */

      flex: 1 1 100%; /* 1 card per row */
    }
  }



.candidate label {
    flex: 0 0 150px;
    font-weight: bold;
    text-align: left;
    margin-right: 10px; /* Added space between label and input */
}

.candidate input,
.candidate textarea,
.candidate select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.candidate input:focus,
.candidate textarea:focus,
.candidate select:focus {
    border-color: #007bff;
    outline: none;
}

.photo {
    width: 100%;
    padding-top: 100%;
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px;
}

.photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

h3 {
    font-family: 'Montserrat', sans-serif; /* Override for specific element */
    margin: 10px 0;
}

.styled-hr {
    border: 0;
    height: 4px;
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 400%;
    animation: rainbow 5s infinite;
    margin: 20px 0;
}

.rainbow-text_baru {
    font-size: 40px;
    font-weight: bold;
    background: linear-gradient(30deg, indigo, green, red, yellow, blue, violet, orange);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 20s infinite;
}

.rainbow-text {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 5s infinite;
}

@keyframes rainbow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

p {
    font-family: 'Roboto', sans-serif; /* Default font */
    color: #666;
    margin-bottom: 20px;
}

button {
    background-color: #0073e6;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #005bb5;
}

.button_mulai {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #4EC85F;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button_mulai:hover {
    background-color: #83D98F;
}

.button_mulai:active {
    background-color: #1ACF33;
    transform: scale(0.95);
}

.button_mulai:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

.fake-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #3852E5;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fake-button:hover {
    background-color: #4F66E9;
}

.fake-button:active {
    background-color: #1030E6;
    transform: scale(0.95);
}

.fake-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

.fake-button_berakhir {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #FF4D55;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fake-button_berakhir:hover {
    background-color: #FF6F75;
}

.fake-button_berakhir:active {
    background-color: #FF1821;
    transform: scale(0.95);
}

.fake-button_berakhir:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.menu {
    display: flex;
    align-items: center;
}

.menu-item {
    position: relative;
    margin: 0 15px;
    padding: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-item:hover {
    color: #007bff;
}

.submenu, .subsubmenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    opacity: 0;
}

.menu-item:hover .submenu,
.submenu-item:hover .subsubmenu {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.submenu {
    background-color: #f8f9fa;
}

.subsubmenu {
    background-color: #e9ecef;
}

.submenu-item, .subsubmenu-item {
    padding: 10px 20px;
    white-space: nowrap;
    color: #333;
    transition: background-color 0.3s ease;
}

.submenu-item:hover {
    background-color: #f0f2f5;
}

.subsubmenu-item:hover {
    background-color: #dee2e6;
}

/* Existing CSS styles */

/* Popup styles */
.popup {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.popup-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .popup-content {
        width: 90%;
    }

    .candidate {
        width: 100%;
        margin-bottom: 20px;
    }

    .vote-button, .detail-button {
        width: 100%;
        margin-top: 10px;
    }
}


/* Notification styles */
.notification {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
}

.notification.success {
    background-color: #4CAF50; /* Green */
}

.notification.error {
    background-color: #f44336; /* Red */
}

.notification_baru {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    background-color: #f44336; /* Red */
}

/* CSS untuk modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-photo {
    margin-bottom: 20px;
}

.modal-photo img {
    max-width: 50%;
    height: auto;
    border-radius: 10px;
}

/* Tambahan CSS jika diperlukan */
.modal h2 {
    margin-top: 0;
}

.modal p {
    text-align: left;
}


/* Contoh style untuk memastikan canvas tampil dengan benar */
.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#votingChart {
    max-width: 80%;
}





