.top-navbar {
    width: 100%;
    background-color: #f8f9fa; 
    color: #333;
    text-align: center;
    margin: 5px;
    padding: 8px 0;
    font-family: Arial, sans-serif;
    font-size: 25px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    margin: 0;
    padding: 20px;
    padding-top: 35px;
}
h2 { text-align: center; margin-bottom: 30px; color: #1a1a1a; }
.candidate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.candidate-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}
.candidate-card:hover { transform: translateY(-5px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.profile-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 32px;
    color: #555;
    margin-bottom: 15px;
    overflow: hidden;
}
.profile-circle img { width: 100%; height: 100%; object-fit: cover; }
.candidate-name { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.candidate-pos { font-size: 14px; color: #888; margin-bottom: 15px; }
.vote-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.vote-btn:hover { background-color: #0056b3; }
.vote-form input[name="stud_code"] {
    width: 93%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    font-size: 16px;
}


        .message { text-align: center; font-weight: bold; padding: 12px; margin: 15px 0; border-radius: 6px; }
        .success { background-color: #e6ffe6; color: #006600; }
        .error   { background-color: #ffe6e6; color: #990000; }

.vote-toggle-btn {
    background-color: #28a745;
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    font-size: 16px;
}

.vote-form { display: none; margin-top: 10px; }
.voted { opacity: 0.6; pointer-events: none; }
.voted::after {
    content: "Voted";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}
.highlight-vote {
    box-shadow: 0 0 15px 5px #28a745 !important;
    transform: translateY(-5px);
    transition: all 0.5s ease;
}
@media(max-width: 600px) {
    .profile-circle { width: 80px; height: 80px; font-size: 24px; }
    .candidate-name { font-size: 16px; }
    .candidate-pos { font-size: 12px; }
}