:root {
    --primary-dark: #2A3155;
    --primary-blue: #314088;
    --light-blue: #5998D3;
    --white: #FFFFFF;
    --grey-100: #F8F9FA;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 40%, var(--light-blue) 100%);
    min-height: 100vh;
    color: var(--white);
    display: flex;
    flex-direction: column;
}

.app-container {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

body.home-page>.app-container {
    max-width: 100%;
    padding: 0;
}

.main-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* =========================================
   HOME PAGE - Premium Project Cards
   ========================================= */
.home-wrapper {
    min-height: 100vh;
    background: linear-gradient(180deg, #2A3155 0%, #5998D3 100%);
    padding: 40px 24px;
    color: #FFFFFF;
    position: relative;
}

/* Language Selector */
.lang-selector {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 100;
}

.lang-selector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.lang-selector-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lang-selector-btn i {
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.2s;
}

.lang-selector.open .lang-selector-btn i {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e1b4b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    overflow: hidden;
    min-width: 160px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.25s;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.lang-selector.open .lang-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.lang-option.active {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-weight: 600;
}

.lang-flag {
    font-size: 1.15rem;
}

.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.5;
    font-size: 1rem;
    padding: 60px 0;
}

/* Sites Grid */
.sites-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 70px;
}

.sites-grid .project-card {
    width: calc(33.333% - 16px);
}

/* Project Card */
.project-card {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    background: #FFFFFF;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.project-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card-image img {
    transform: scale(1.08);
}

.project-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-card-placeholder .placeholder-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.project-card-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.35);
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    background: #FFFFFF;
}

.project-card-footer h3 {
    margin: 0;
    font-size: clamp(0.75rem, 2.5vw, 1.05rem);
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Home Footer */
.home-footer {
    text-align: center;
    padding: 50px 0 20px;
}

.home-footer span {
    font-size: 0.72rem;
    opacity: 0.35;
}

/* Home Responsive */
@media (max-width: 600px) {
    .sites-grid .project-card {
        width: 100%;
    }

    .home-wrapper {
        padding: 20px 16px;
    }

    .sites-grid {
        padding-top: 60px;
    }

    .lang-selector {
        top: 16px;
        right: 16px;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .sites-grid .project-card {
        width: calc(50% - 12px);
    }
}


/* =========================================
   DETAIL PAGE - Modern Kvizit Theme
   ========================================= */
body.detail-page {
    display: block;
}

body.detail-page>.app-container {
    display: none;
}

.detail-page .profile-name {
    color: #FFFFFF;
}

.detail-page .profile-desc {
    color: rgba(255, 255, 255, 0.7);
}

.detail-page .section-divider span {
    color: rgba(255, 255, 255, 0.5);
}

.detail-page .section-divider::before,
.detail-page .section-divider::after {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.detail-page .info-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.detail-page .info-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.detail-page .info-card-label {
    color: rgba(255, 255, 255, 0.6);
}

.detail-page .info-card-value {
    color: #FFFFFF;
}

.detail-page .info-card-action {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.detail-page .info-card:hover .info-card-action {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.detail-page .social-icon-btn {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF !important;
}

.detail-page .social-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.detail-page .detail-footer {
    color: rgba(255, 255, 255, 0.4);
}

.detail-page .profile-avatar {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.detail-wrapper {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(89, 152, 211, 0.3);
    box-shadow: 0 4px 20px rgba(89, 152, 211, 0.2);
    margin-bottom: 16px;
    background: white;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 6px;
}

.profile-desc {
    font-size: 0.9rem;
    color: #6B7280;
    font-weight: 400;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    margin: 35px 0 20px;
    gap: 16px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(107, 114, 128, 0.2), transparent);
}

.section-divider span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: #9CA3AF;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.links-grid> :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 6px);
    justify-self: center;
}

/* Info Card */
.info-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(200, 210, 230, 0.5);
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #1A1A2E;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(89, 152, 211, 0.3);
}

.info-card:active {
    transform: scale(0.98);
}

.info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.info-card:nth-child(2) {
    animation-delay: 0.15s;
}

.info-card:nth-child(3) {
    animation-delay: 0.2s;
}

.info-card:nth-child(4) {
    animation-delay: 0.25s;
}

.info-card:nth-child(5) {
    animation-delay: 0.3s;
}

.info-card:nth-child(6) {
    animation-delay: 0.35s;
}

.info-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    background: #FFFFFF !important;
}

.info-card:hover .info-card-icon {
    transform: scale(1.1);
}

.info-card-content {
    flex: 1;
    min-width: 0;
}

.info-card-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-card-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1A1A2E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-card-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6B7280;
    background: rgba(107, 114, 128, 0.08);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-card:hover .info-card-action {
    background: rgba(89, 152, 211, 0.15);
    color: var(--light-blue);
}

/* Social Quick Icons (header area) */
.social-quick {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.social-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(200, 210, 230, 0.5);
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.social-icon-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* Share Section */
.share-section {
    text-align: center;
    padding: 30px 0 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.share-btn i {
    font-size: 1.1rem;
}

/* Share Modal */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.share-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.share-modal {
    background: #FFFFFF;
    border-radius: 24px;
    width: 90%;
    max-width: 380px;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.share-modal-overlay.active .share-modal {
    transform: translateY(0) scale(1);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.share-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.share-modal-body {
    padding: 28px 24px;
    text-align: center;
}

.qr-container {
    display: inline-block;
    padding: 16px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 2px solid #f0f0f0;
    margin-bottom: 12px;
}

.qr-container img {
    display: block;
    border-radius: 8px;
}

.qr-hint {
    font-size: 0.8rem;
    color: #999;
    margin: 0 0 24px;
}

.share-actions {
    display: flex;
    gap: 12px;
}

.share-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.whatsapp-share {
    background: #25D366;
    color: #FFFFFF;
}

.whatsapp-share:hover {
    background: #1db954;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

.copy-link-share {
    background: #f0f2f5;
    color: #1a1a2e;
}

.copy-link-share:hover {
    background: #e4e6ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Detail Footer */
.detail-footer {
    text-align: center;
    padding: 40px 20px 20px;
    font-size: 0.75rem;
    color: #9CA3AF;
    letter-spacing: 0.5px;
}

/* Detail Page Responsive */
@media (max-width: 560px) {
    .links-grid {
        grid-template-columns: 1fr;
    }

    .links-grid> :last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
        justify-self: stretch;
    }

    .detail-wrapper {
        padding: 30px 16px 40px;
    }

    .profile-avatar {
        width: 85px;
        height: 85px;
    }

    .profile-name {
        font-size: 1.35rem;
    }
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   ADMIN PANEL
   ========================================= */

/* Admin Login */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: none;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: var(--light-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.login-error {
    color: #ff6b6b;
    text-align: center;
}

/* Admin Dashboard */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-add {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btns a {
    margin-right: 10px;
    color: white;
    opacity: 0.8;
}

.action-btns a:hover {
    opacity: 1;
}

.btn-delete {
    color: #ff6b6b !important;
}

.admin-logout {
    color: white;
    margin-left: 20px;
}

/* Admin Site Form */
.admin-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
}

.admin-form label {
    display: block;
    margin-top: 15px;
}

.admin-form input,
.admin-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: none;
}

.btn-save {
    background: var(--light-blue);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    margin-top: 20px;
    cursor: pointer;
}

.current-logo {
    margin-top: 10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    display: block;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.form-cancel {
    color: white;
    margin-left: 15px;
}

/* Admin Links */
.link-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.link-form input,
.link-form select {
    padding: 8px;
    margin: 5px;
    border-radius: 4px;
    border: none;
}

.link-table {
    width: 100%;
    border-collapse: collapse;
}

.link-table th,
.link-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.btn-link-add {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.back-link {
    color: white;
    display: inline-block;
    margin: 10px 0;
}

/* Gradient Picker */
.gradient-picker {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.color-pick span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.color-pick input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 2px;
    border-radius: 8px;
    cursor: pointer;
}

.gradient-preview {
    width: 120px;
    height: 50px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Admin Style Sections */
.style-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.style-section h3 {
    margin-bottom: 15px;
    font-size: 1rem;
    opacity: 0.9;
}

.style-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.style-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.style-field span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.style-field select {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    background: white;
    color: #1A1A2E;
    min-width: 150px;
}

.font-preview {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    font-size: 1.6rem;
    font-weight: 700;
}

.font-preview-small {
    font-size: 0.9rem;
    font-weight: 400;
}

.heading-tag-preview {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}