/* ========================================
SKILLBARTER - COMPLETE STYLESHEET
Homepage, Login, Register, Explore, Dashboard
======================================== */

/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6254d9;
    --primary-dark: #493bb8;
    --primary-light: #eeecff;
    --text: #292943;
    --muted: #73758b;
    --background: #f5f6fc;
    --white: #ffffff;
    --border: #e5e7f1;
    --success: #239b70;
    --danger: #d94c65;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, 90%);
    margin: 0 auto;
}

/* ========================================
NAVIGATION
======================================== */

.site-header,
.navbar {
    background: var(--white);
    box-shadow: 0 3px 15px rgba(30, 30, 70, 0.07);
    position: relative;
    z-index: 10;
}

.nav-container {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.logo {
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--text);
}

.main-nav,
.navbar nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.main-nav a,
.navbar nav a {
    color: #45455d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.navbar nav a:hover {
    color: var(--primary);
}

.main-nav .nav-button {
    color: var(--white);
}

.main-nav .nav-button:hover {
    color: var(--white);
}

/* ========================================
BUTTONS
======================================== */

.button,
button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 9px;
    padding: 12px 19px;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover,
button:hover {
    background: var(--primary-dark);
}

.button:active,
button:active {
    transform: translateY(1px);
}

button:disabled {
    background: #dfe2ec;
    color: #65677b;
    cursor: not-allowed;
    transform: none;
}

.button.primary {
    background: var(--primary);
    color: var(--white);
}

.button.primary:hover {
    background: var(--primary-dark);
}

.button.full {
    width: 100%;
}

.nav-button {
    padding: 11px 18px;
}

/* ========================================
HOMEPAGE / HERO
======================================== */

.hero {
    padding: 85px 0;
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 55%, #eeecff 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 45px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--text);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    margin-top: 20px;
    max-width: 600px;
    line-height: 1.8;
    color: var(--muted);
    font-size: 17px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button.secondary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid #d9d4ff;
}

.button.secondary:hover {
    background: var(--primary-light);
}

.hero-image {
    flex: 1;
    max-width: 480px;
}

.hero-image img {
    width: 100%;
    border-radius: 24px;
}

.section {
    padding: 65px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.section-title h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    padding: 28px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(30, 40, 80, 0.04);
}

.feature-card h3 {
    margin: 14px 0 9px;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.7;
}

.feature-icon {
    font-size: 30px;
}

/* ========================================
LOGIN AND REGISTER LAYOUT
======================================== */

.auth-layout {
    width: min(1120px, 90%);
    min-height: 590px;
    margin: 45px auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 55px;
}

.auth-intro {
    padding: 15px 0;
}

.auth-intro .eyebrow {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.auth-intro h1 {
    color: var(--text);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.auth-intro > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.auth-highlight {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 35px;
    padding: 20px;
    border: 1px solid #e2deff;
    border-radius: 14px;
    background: var(--primary-light);
}

.highlight-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 24px;
}

.auth-highlight strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.auth-highlight p {
    color: var(--muted);
    line-height: 1.5;
}

.form-card {
    width: 100%;
    background: var(--white);
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(40, 40, 90, 0.09);
}

.form-card h2 {
    font-size: 29px;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 10px;
}

.muted {
    color: var(--muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.form-card form label {
    display: block;
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #34344b;
}

.form-card input,
.form-card select,
.form-card textarea {
    display: block;
    width: 100%;
    padding: 14px;
    border: 1px solid #dcdfee;
    border-radius: 8px;
    font-size: 15px;
    background: var(--white);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(98, 84, 217, 0.12);
}

.form-card .full {
    width: 100%;
    margin-top: 25px;
}

.auth-switch {
    margin-top: 22px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.form-message {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.login-layout {
    padding: 10px 0;
}

/* ========================================
DASHBOARD
======================================== */

.dashboard {
    max-width: 1150px;
    margin: 35px auto;
    padding: 0 22px;
}

.welcome {
    background: linear-gradient(120deg, #6254d9, #8977f0);
    color: var(--white);
    padding: 38px;
    border-radius: 18px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(98, 84, 217, 0.18);
}

.welcome h1 {
    font-size: 32px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.welcome p {
    font-size: 16px;
    line-height: 1.7;
}

/* ========================================
DASHBOARD PANELS
======================================== */

.panel {
    background: var(--white);
    padding: 28px;
    margin-bottom: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(30, 40, 80, 0.05);
    border: 1px solid #e9ebf4;
}

.panel h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text);
}

.panel > p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.panel h3 {
    margin-bottom: 14px;
    color: #4941a5;
}

.panel p {
    overflow-wrap: anywhere;
}

/* ========================================
ADD SKILLS FORM
======================================== */

#skillForm {
    display: flex;
    gap: 12px;
    margin: 22px 0;
    flex-wrap: wrap;
}

#skillName,
#skillType,
#searchInput {
    padding: 13px;
    border: 1px solid #dcdfee;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: var(--white);
    color: var(--text);
}

#skillName {
    flex: 2;
    min-width: 190px;
}

#skillType {
    flex: 1;
    min-width: 160px;
}

#searchInput {
    width: min(70%, 500px);
    margin: 12px 8px 20px 0;
}

#skillName:focus,
#skillType:focus,
#searchInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(98, 84, 217, 0.1);
}

/* ========================================
SKILL COLUMNS
======================================== */

.skill-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.skill-columns > div {
    background: #fafaff;
    padding: 20px;
    border: 1px solid #ededf8;
    border-radius: 12px;
}

/* ========================================
SKILL ITEMS
======================================== */

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #efedff;
    padding: 12px 14px;
    margin: 10px 0;
    border-radius: 9px;
    color: #4438a4;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.skill-item button {
    background: #e2deff;
    color: #4438a4;
    padding: 7px 10px;
    flex-shrink: 0;
}

.skill-item button:hover {
    background: #d2cbff;
}

/* ========================================
PARTNER CARDS
======================================== */

#partnerResults,
#myConnections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.partner-card {
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    overflow-wrap: anywhere;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.partner-card:hover {
    box-shadow: 0 6px 20px rgba(30, 40, 80, 0.07);
    transform: translateY(-2px);
}

.partner-card h3 {
    color: #343052;
    margin-bottom: 9px;
}

.partner-card p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.5;
}

.partner-card button {
    margin-top: 12px;
}

#myConnections .partner-card {
    border-left: 4px solid #36ad7a;
}

/* ========================================
REQUESTS
======================================== */

#incomingRequests,
#outgoingRequests {
    margin: 15px 0 25px;
}

.request-item {
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fcfcff;
}

.request-item p {
    margin-bottom: 12px;
    line-height: 1.5;
}

.request-item button {
    margin-right: 8px;
    margin-top: 4px;
}

.request-item button:last-child {
    background: #e8e9f1;
    color: #393c50;
}

.request-item button:last-child:hover {
    background: #d8dae6;
}

/* ========================================
EMPTY MESSAGES
======================================== */

#offeredSkills > p,
#wantedSkills > p,
#incomingRequests > p,
#outgoingRequests > p,
#myConnections > p,
#partnerResults > p {
    color: #777b91;
    padding: 12px 0;
    line-height: 1.6;
}

/* ========================================
EXPLORE / GENERIC CONTENT
======================================== */

.page-heading {
    padding: 45px 0 25px;
}

.page-heading h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.page-heading p {
    color: var(--muted);
    line-height: 1.7;
}

.content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

/* ========================================
FOOTER
======================================== */

.site-footer {
    margin-top: 35px;
    padding: 24px 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.site-footer p {
    line-height: 1.7;
}

/* ========================================
RESPONSIVE DESIGN
======================================== */

@media (max-width: 800px) {
    .container {
        width: 92%;
    }

    .nav-container {
        padding: 18px 0;
    }

    .main-nav,
    .navbar nav {
        gap: 15px;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 35px auto;
    }

    .auth-intro h1 {
        font-size: 35px;
    }

    .dashboard {
        margin: 22px auto;
        padding: 0 14px;
    }

    .welcome {
        padding: 25px;
    }

    .welcome h1 {
        font-size: 27px;
    }

    .panel {
        padding: 22px;
    }

    .skill-columns,
    #partnerResults,
    #myConnections {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        padding: 55px 0;
    }

    .hero .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-image {
        max-width: 100%;
        width: 100%;
    }

    #searchInput {
        width: 100%;
        margin-right: 0;
    }

}

@media (max-width: 480px) {
    .main-nav,
    .navbar nav {
        gap: 12px;
        font-size: 13px;
    }

    .logo {
        font-size: 25px;
    }

    .auth-layout {
        width: 92%;
        margin: 25px auto;
    }

    .auth-intro h1 {
        font-size: 30px;
    }

    .form-card {
        padding: 22px;
    }

    .welcome {
        padding: 22px;
    }

    .welcome h1 {
        font-size: 24px;
    }

    .panel {
        padding: 18px;
    }

    #skillForm {
        flex-direction: column;
    }

    #skillName,
    #skillType {
        width: 100%;
        min-width: 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 35px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .button {
        width: 100%;
    }

}