body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.home-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #141414, #0b0b0b);
    margin: 0;
    padding: 0;
}

.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 80px 60px;
    
    width: 90%;
    max-width: 1500px;
    min-width: 800px;

    min-height: 60vh; 
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.home-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 100px rgba(128, 199, 255, 0.5);
}

html {
    overflow: auto;
    background-color: #111;
}

.glass-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 50px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
}

.glass-container h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: #80c7ff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.glass-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.glass-container label {
    text-align: left;
    font-size: 14px;
    margin-bottom: 5px;
}

.glass-container input {
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
}

.glass-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.glass-container input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px #80c7ff;
    transform: scale(1.02);
}

.glass-container button {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-container button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.glass-container button:hover::after {
    top: 0;
    left: 0;
}

.glass-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(128, 199, 255, 0.5);
}

.glass-container button.add-btn {
    background: linear-gradient(90deg, #ff9c6c, #ffd93d);
    color: #111;
}

.glass-container button.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 180, 100, 0.5);
}

.link-text, .glass-container p {
    font-size: 14px;
    margin-top: 15px;
}

a {
    color: #80c7ff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
}

a:hover {
    color: #a0d7ff;
    text-decoration: underline;
}

.consent-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.consent-buttons button {
    flex: 1;
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: url("/icons/BebiloidIcon.svg") no-repeat center center;
    background-size: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.home-button:hover {
    transform: scale(1.15);
}

.profile-menu,
.login-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.profile-menu img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.profile-menu img:hover {
    transform: scale(1.05);
}

.profile-menu .dropdown {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    overflow: hidden;
    min-width: 180px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.profile-menu .dropdown.active {
    display: block;
}

.profile-menu .dropdown .username {
    padding: 12px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.profile-menu .dropdown a {
    display: block;
    padding: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.profile-menu .dropdown a:hover {
    background: rgba(128, 199, 255, 0.2);
}

.login-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: linear-gradient(90deg, #3a8fd4, #80c7ff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(128, 199, 255, 0.5);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-corner {
    background: transparent;
    width: 0;
    height: 0;
    border-left: 16px solid #8B7E79;
    border-top: 16px solid #8B7E79;
    border-bottom: 16px solid transparent;
    border-right: 16px solid transparent;
}

::-webkit-scrollbar-track {
    background: #111;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
    border: 2px solid #111;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #222;
    box-shadow: 0 0 8px rgba(128, 199, 255, 0.6);
}

.avatar-library {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;

    /* optional fade in/out animation */
    transform: translateY(0);
    opacity: 1;
}

.avatar-library-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.avatar-library-content h3 {
    margin-bottom: 20px;
    color: #80c7ff;
}

.avatar-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.upload-button {
    width: 100%;
    height: 80px;
    border-radius: 15px;
    background: transparent;
    border: 2px dashed #80c7ff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: #80c7ff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.upload-button:hover {
    transform: scale(1.05);
}

.upload-button::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #80c7ff;
    -webkit-mask: url('../icons/upload-arrow.svg') no-repeat center;
    -webkit-mask-size: 100% 100%;
    mask: url('../icons/upload-arrow.svg') no-repeat center;
    mask-size: 100% 100%;
}

.avatar-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 15px;
}

.avatar-list img, .avatar-list button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid #67a0cb;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.avatar-list img:hover, .avatar-list button:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px 5px rgba(128, 199, 255, 0.3);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent !important;
    border: none;
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    border-radius: 50%;
    mix-blend-mode: normal;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.dashboard-header {
    position: relative;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    box-sizing: border-box; /* ensure padding is included in width */
}


.dashboard-header h1 {
    margin: 0;
    font-size: 24px;
    color: #80c7ff;
}

.dashboard-header .profile-menu {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
}

.logout-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media (max-width: 500px) {
    .dashboard-header {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }

    .logout-btn {
        width: 100%;
        text-align: center;
    }
}

.logout-btn:hover {
    background: linear-gradient(90deg, #3a8fd4, #80c7ff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(128,199,255,0.5);
    text-decoration: none;
}

.dashboard-main {
    flex: 1;
    padding: 40px;
}

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.guild-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 15px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guild-card.no-access {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.guild-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(128, 199, 255, 0.4);
}

.guild-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
    border: 2px solid #67a0cb;
}

.guild-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #80c7ff;
    text-align: center;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.guild-card.skeleton {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    animation: pulse 1.5s infinite;
}

.guild-card.skeleton:hover {
    transform: none;
    box-shadow: none;
    cursor: default;
}

.skeleton-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    background: #444;
}

.skeleton-text {
    width: 80%;
    height: 18px;
    background: #444;
    border-radius: 6px;
    margin-bottom: 6px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.guild-card-link {
    text-decoration: none;
    display: block;
}

.guild-card-link .guild-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guild-card-link,
.guild-card-link h4 {
    text-decoration: none;
    color: inherit;
}

.guild-card-link:hover,
.guild-card-link:hover h4 {
    text-decoration: none;
}

.guild-card-link .guild-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(128, 199, 255, 0.4);
    text-decoration: none;
}

.guild-card-link .guild-card:active {
    transform: scale(0.98);
    box-shadow: 0 5px 15px rgba(128, 199, 255, 0.3);
    text-decoration: none;
}

.guild-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.guild-actions button,
.guild-actions a {
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.guild-actions button:hover,
.guild-actions a:hover {
    background: linear-gradient(90deg, #3a8fd4, #80c7ff);
    box-shadow: 0 5px 15px rgba(128, 199, 255, 0.5);
    transform: translateY(-2px);
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.home-btn {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 14px;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.home-footer {
    margin-top: 30px;
    font-size: 15px;
    color: rgba(255,255,255,0.5);
}

.webhook-modal {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.webhook-modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0,0,0,0.7);
}

.webhook-modal h3 {
    color: #80c7ff;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

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

.modal-buttons button:hover {
    transform: translateY(-2px);
}

.modal-buttons button:first-child {
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
}

.modal-buttons button:last-child {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.webhook-modal {
    display: none; /* hidden by default */
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.webhook-modal.active {
    display: flex;
}

.webhook-modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    max-width: 450px;
    width: 90%;
    text-align: center;
    color: #fff;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.webhook-modal-content h3 {
    color: #80c7ff;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.webhook-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.webhook-form label {
    text-align: left;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.webhook-form input[type="text"],
.webhook-form input[type="url"] {
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: auto;
    font-size: 14px;
    transition: all 0.3s ease;
}

.webhook-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.webhook-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px #80c7ff;
    transform: scale(1.02);
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.modal-buttons button[type="submit"] {
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
}

.modal-buttons button[type="submit"]:hover {
    box-shadow: 0 5px 20px rgba(128, 199, 255, 0.5);
    transform: translateY(-2px);
}

.modal-buttons .close-webhook-modal {
    background: linear-gradient(90deg, #80c7ff, #3a8fd4);
    color: #fff;
}

.modal-buttons .close-webhook-modal:hover {
    box-shadow: 0 5px 20px rgba(128, 199, 255, 0.5);
    transform: translateY(-2px);
}

.webhook-modal .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.webhook-modal .close-button:hover {
    transform: scale(1.2);
    color: #80c7ff;
}