/* 
 * Reputation Boost - Main Stylesheet
 * --------------------------------
 */

/* Base & Reset */
:root {
    --primary-color: #0077CC;
    --secondary-color: #00C2A8;
    --primary-darker: #005fa3;
    --primary-lighter: #2090e0;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --border-color: #ddd;
    --white: #ffffff;
    --black: #000000;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --border-radius: 4px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-darker);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 65px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
}

.nav-link i {
    margin-right: 6px;
    font-size: 0.9em;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(0, 119, 204, 0.1);
    color: var(--primary-color);
}

/* Register Button */
.btn-register {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 18px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color var(--transition-speed) ease;
}

.btn-register:hover {
    background-color: var(--primary-darker);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    margin-left: 20px;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed) ease;
}

.dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.user-avatar {
    margin-right: 8px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-name {
    font-weight: 500;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    width: 200px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-link {
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
        order: 3;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        transform: translateY(-100%);
        transition: transform var(--transition-speed) ease;
        z-index: -1;
    }
    
    .nav.show {
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        margin: 5px 0;
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        padding: 12px;
    }
    
    .user-dropdown {
        margin: 15px 0 0;
        width: 100%;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-menu {
        position: relative;
        width: 100%;
        top: 0;
        margin-top: 8px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content Area */
main {
    padding: 30px 0;
}

/* Card Component */
.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
}

.btn-secondary {
    color: var(--white);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: darken(var(--secondary-color), 7%);
    border-color: darken(var(--secondary-color), 7%);
}

.btn-outline-primary {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-speed) ease;
}

.form-control:focus {
    outline: 0;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 204, 0.25);
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.ml-5 { margin-left: 3rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.mr-4 { margin-right: 1.5rem; }
.mr-5 { margin-right: 3rem; }
