:root {
    --primary: #7C3AED;
    --primary-light: #b99cec;
    --primary-hover: #6D28D9;
    --accent: #10B981;
    --bg-dark: #050507;
    --bg-card: #0F0F13;
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.03);
    --gradient: linear-gradient(90deg, #7C3AED, #EC4899);
}

.reveal-init {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: #2b2b2b;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html,
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: white;
}

h1,
h2,
h3,
.logo {
    font-weight: bold;
    font-weight: 800;
}

.login-logo {
    width: 60px;
}

header {
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1001;
    overflow: visible;
}

button {
    padding: 12px;
    border-radius: 10px;
    background: var(--primary);
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: 600;

    transition: background-color 0.3s ease;
}

button:hover {
    background: var(--primary-hover);
}

.delete-list {
    font-size: 15px;
    background-color: #ff5a5a;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    padding: 0;
}

.avatar-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    margin-bottom: 0;
    object-fit: cover;
    background: var(--glass);
    flex-shrink: 0;
    margin: 0;
}

.avatar-preview-settings {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    margin-bottom: 15px;
    object-fit: cover;
    background: var(--glass);
}

.avatar-preview-links {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    background: var(--glass);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#maxw-input input {
    max-width: 100%;
    width: 100%;
}

.header-title {
    height: 21.6px;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
    font-size: 1.5rem;
}

#page {
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-area {
    align-items: center;
}

.back-page {
    font-weight: bold;
    align-items: center;
    display: flex;
    text-decoration: none;
    line-height: 1;
}


#userA {
    font-weight: bold;
    align-items: center;
    display: flex;
    text-decoration: none;
    line-height: 1;
}

#userA:hover {
    color: white;
}

.user-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    cursor: pointer;
}


.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    width: 210px;
    padding: 8px;

    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);

    z-index: 2000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    pointer-events: none;

    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.3s;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--glass);
    color: var(--text-main);
    padding-left: 20px;
    border-radius: 15px;
}

@media screen and (max-width: 670px) {
    #nav-menu {
        display: none;
    }

    .dropdown-menu::before {
        display: none !important;
    }

    .dropdown-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: calc(100vh - 70px);
        border-radius: 0;
        border: none;
        margin-top: 0;
        background: var(--bg-dark);
    }
}

#btn-logout:hover {
    color: rgb(233, 83, 83);
}

.top-container {
    margin-bottom: 50px;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
    opacity: 0.7;
}

nav a:hover {
    opacity: 1;
}

.btn-header {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: pointer;
}

.btn-logout {
    background: #ff5a5a;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: pointer;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 8%;
    text-align: center;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.input-group {
    width: 100%;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 10px;
    min-width: 280px;
    z-index: 1000;

    opacity: 0;
    visibility: hidden;

    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.3s ease,
        visibility 0.3s;
}

.modal-overlay.open,
.modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal.open {
    transform: translate(-50%, -50%) scale(1);

    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    visibility: hidden;

    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease,
        visibility 0.3s;

    pointer-events: none;
}

.modal.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal h3 {
    margin: 0 0 12px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.modal-actions .danger {
    background: #c0392b;
    color: white;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--primary);
    color: #fff;
    gap: 8px;
    margin-top: 10px;
}

.btn:hover, button:hover, .btn-header:hover, .btn-login:hover, .btn-box:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}


.btn:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    padding: 13px;
    border-radius: 10px;
    background: #05050731;
    border: 1px solid var(--border);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-card);
}

.btn-docs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #00000018;
    color: #fff;
    gap: 8px;
    margin-top: 10px;
}

.btn-docs:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 2, 2, 0.3);
}

main {
    flex: 1;
}

.services-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.card,
.project-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.card:hover,
.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}

.card .icon {
    width: 60px;
    height: 60px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
    transition: 0.3s;
}

.card:hover .icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.image-wrapper {
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-container {
    flex: 1;
    width: 100%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.3s ease,
        box-shadow 0.4s ease;
}

.login-box:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

.login-box h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.login-error {
    margin-bottom: -10px;
}

.login-footer {
    margin-top: 10px;
    margin-bottom: 10px;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px;
}

input {
    width: 100%;
    max-width: 340px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.btn-login {
    width: 100%;
    max-width: 340px;
    padding: 16px;
    border-radius: 14px;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-box {
    width: 100%;
    max-width: 340px;
    padding: 16px;
    border-radius: 14px;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 15px;
}


.box-container {
    flex: 1;
    width: 100%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.3s ease,
        box-shadow 0.4s ease;
}

.box:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

.box h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.forgot-password {
    margin-top: 20px;
    display: block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 40px 8%;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    border: none;
}

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 14px;

    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);

    color: var(--text-main);
    font-size: 14px;

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    display: flex;
    align-items: center;
    gap: 10px;

    transform: translateX(120%);
    opacity: 0;

    animation: toast-slide-in 0.45s cubic-bezier(.16, 1, .3, 1) forwards;
}

.toast::before {
    content: "";
    width: 4px;
    height: 100%;
    border-radius: 4px;
    background: var(--gradient);
}

.toast.hide {
    animation: toast-slide-out 0.35s cubic-bezier(.4, 0, 1, 1) forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes toast-in {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes toast-out {
    to {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
}
