:root {
    --bg-color: #f0f2f5;
    --text-color: #1a1a1a;
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --secondary: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --input-bg: rgba(255, 255, 255, 0.9);
}

.dark-mode {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #f472b6;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --input-bg: rgba(30, 41, 59, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
.background-gradients {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: #06b6d4;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, -50px) scale(1.1);
    }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: rotate(15deg);
    background: var(--glass-bg);
}

/* Main Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sections */
section {
    width: 100%;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(20px);
}

.active-page {
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landing Page */
#landing-page {
    text-align: center;
    padding: 4rem 1rem;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#landing-page p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.back-btn:hover {
    opacity: 1;
}

/* Form Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.9;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

.row {
    display: flex;
    gap: 1rem;
}

.row .form-group {
    flex: 1;
}

/* Freelancer Grid */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.freelancer-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.freelancer-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ddd, #aaa);
    margin: 0 auto 1rem;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.f-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.f-skill {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.f-rating {
    color: #f59e0b;
    margin-bottom: 1rem;
}

.status-dot {
    height: 10px;
    width: 10px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-text {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
}

/* Lobby Pulse */
.center-content {
    text-align: center;
}

.pulse-ring {
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 2rem;
    position: relative;
    opacity: 0.2;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse 2s infinite;
}

.pulse-ring::after {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

/* Interaction Window */
.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: var(--glass-bg);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.timer-box {
    text-align: left;
}

.timer-box span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#session-timer {
    font-family: monospace;
    font-size: 1.5rem;
    color: var(--primary);
}

.workspace-split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    height: 60vh;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.info-pane h3,
.work-pane h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

#display-job-details p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.file-drop-area {
    margin-top: auto;
    border: 2px dashed var(--glass-border);
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.file-drop-area:hover {
    opacity: 1;
    border-color: var(--primary);
}

#live-workspace {
    flex: 1;
    width: 100%;
    background: var(--input-bg);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 1rem;
    resize: none;
}

.security-warning {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #ef4444;
    text-align: right;
}

/* Notification Toast */
#notification-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .workspace-split {
        grid-template-columns: 1fr;
        height: auto;
    }

    .glass-panel {
        height: 400px;
    }

    .form-card {
        padding: 1.5rem;
    }

    .row {
        flex-direction: column;
    }
}

.footer-text {
    padding: 1rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
}