:root {
    --bg-color: #0f0c29;
    --bg-gradient: linear-gradient(301deg, #0f0c29, #302b63, #24243e);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --card-bg: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

button {
    cursor: pointer;
}

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Login Page */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Professional Login Styles */
.professional-login-container {
    background: rgba(16, 18, 27, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.professional-login-container::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    filter: blur(60px);
    opacity: 0.5;
    border-radius: 50%;
}

.professional-login-container::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--secondary-color);
    filter: blur(60px);
    opacity: 0.5;
    border-radius: 50%;
}

.login-brand {
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.login-brand h1 {
    font-size: 2em;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.login-brand h3 {
    font-size: 1em;
    color: var(--primary-color);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.login-form-group {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    text-align: left;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0b0;
    font-size: 0.9em;
    font-weight: 500;
}

.login-input-wrapper {
    position: relative;
}

.login-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.1em;
    transition: 0.3s;
}

.login-form-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    background: rgba(16, 18, 27, 0.4);
    color: white;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.login-form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
    background: rgba(16, 18, 27, 0.6);
}

.login-form-group input:focus+i {
    color: var(--secondary-color);
}

.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 2;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

/* Form Styles */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #ddd;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
    transition: 0.3s;
}

.input-group select option {
    background: #1a1a2e;
    /* Dark background for options so text is visible */
    color: white;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.9em;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.error {
    color: #ff6b6b;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .input-group {
    flex: 1;
}

/* Dashboard */
.dashboard-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

.actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.projects-grid {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    column-gap: 20px;
    row-gap: 20px;
    grid-auto-rows: max-content;
    align-items: start;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
    padding-bottom: 60px;
    padding-top: 20px;

    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Chrome/Safari */
.projects-grid::-webkit-scrollbar {
    display: none;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.iframe-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    background-color: #fff;
}

.iframe-container iframe,
.iframe-container img {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s;
}

.project-card:hover .iframe-container img {
    transform: scale(1.05);
}

.iframe-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    background-color: #1a1a2e;
    /* Dark placeholder bg */
}

.refresh-thumb-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    opacity: 0;
    transition: 0.3s;
    backdrop-filter: blur(2px);
    z-index: 10;
}

.iframe-container:hover .refresh-thumb-btn {
    opacity: 1;
}

.refresh-thumb-btn:hover {
    background: var(--primary-color);
}


/* Full Screen Preview Modal */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.preview-header {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header h3 {
    color: white;
    margin: 0;
}

.close-preview {
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.close-preview:hover {
    background: #ff5252;
}

.preview-body {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 2px;
}

.preview-body iframe {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 0 0 10px 10px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a2e;
    color: #fff;
    flex-direction: column;
    gap: 10px;
}

.load-preview-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.load-preview-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 5px;
    font-size: 1.25em;
    color: var(--primary-color);
}

.hosting-info {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.view-btn,
.edit-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.view-btn {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding-top: 60px;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a2e;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    color: white;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover,
.close:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #aaa;
}

/* Layout */
.content-wrapper {
    display: flex;
    gap: 30px;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    height: 100%;
    padding: 25px;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1em;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
}

.filter-group input[type="text"] {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95em;
    color: #ddd;
    transition: color 0.2s;
}

.checkbox-group label:hover {
    color: white;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    color: white;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.badge-sub {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.badge-client {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
    .glass-header {
        position: relative;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    .actions {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 15px;
        background: rgba(0, 0, 0, 0.8);
        padding: 15px;
        border-radius: 10px;
    }

    .actions.active {
        display: flex;
    }

    .actions button,
    .actions a {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }

    .content-wrapper {
        flex-direction: column;
        position: relative;
    }

    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        height: 100%;
        background: #0f0c29;
        /* Solid background */
        z-index: 1001;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
        border-right: 1px solid var(--glass-border);
    }

    .sidebar.active {
        left: 0;
    }

    .filter-toggle-btn {
        display: block;
        margin-bottom: 20px;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        align-self: flex-start;
    }

    .close-sidebar {
        display: block;
    }
}

.filter-toggle-btn {
    display: none;
}

.close-sidebar {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

/* Client Management */
.client-management {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.client-management::-webkit-scrollbar {
    width: 8px;
}

.client-management::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.client-management::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.client-management::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 210, 255, 0.8);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.client-tabs {
    display: flex;
    gap: 15px;
}

.client-tab {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.client-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.client-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.client-tab-content.active {
    display: block;
}

.client-section {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.client-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.client-section.center {
    text-align: center;
}

.share-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.share-tab-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    cursor: pointer;
    font-size: 1em;
}

.share-tab-label input[type="radio"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

/* Input Row for horizontal layout */
.input-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.input-row .input-group {
    flex: 1;
}

.project-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Hide scrollbar for project selection */
.project-selection::-webkit-scrollbar {
    width: 6px;
}

.project-selection::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.project-selection::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.project-selection::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 210, 255, 0.8);
}

.project-select-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    cursor: pointer;
}

.project-select-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.project-select-card label {
    flex: 1;
    color: white;
    cursor: pointer;
    font-size: 0.95em;
}

.project-select-card input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Client List */
.client-list {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
}

.client-list-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 120px 80px;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 210, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.client-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 120px 80px;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 10px;
    align-items: center;
    transition: 0.3s;
}

.client-row:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.client-row span {
    color: white;
}

.delete-client {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: #ff6b6b;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1em;
}

.delete-client:hover {
    background: rgba(255, 100, 100, 0.4);
}

/* Credential Display */
.credential-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.credential-row {
    padding: 10px 0;
    color: white;
    font-size: 1em;
}

.credential-row strong {
    color: var(--primary-color);
    margin-right: 10px;
}