/* ================================
   Modern UX Enhancements
   ================================ */

/* Note: Root variables are defined in style.css for consistency */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Body Typography Enhancement */
body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Password Toggle */
.password-field-wrapper {
    position: relative;
}

.password-field-wrapper input {
    padding-right: 45px !important;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-base);
    z-index: 10;
    padding: 5px;
    border-radius: 4px;
}

.password-toggle-icon:hover {
    color: var(--accent-color);
    background-color: color-mix(in srgb, var(--accent-color), transparent 95%);
}

.logo-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Auth Title Styling */
.title {
    text-align: center;
    margin-bottom: 2rem;
}

.title span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Checkbox Enhancement */
.icheck-primary input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.icheck-primary label {
    cursor: pointer;
    margin-left: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Link Styling */
.forget-password,
a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    position: relative;
}

.forget-password:hover::after,
a:not(.btn):hover::after {
    width: 100%;
}

.forget-password:hover,
a:hover {
    color: color-mix(in srgb, var(--accent-color), #000 20%);
}

/* ================================
   Animations
   ================================ */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Apply animations to sections */
.platforms {
    animation: fadeIn 0.8s ease-out;
}

.col-lg-4,
.col-md-6 {
    animation: slideInUp 0.6s ease-out;
}

/* Stagger animation for cards */
.col-lg-4:nth-child(1) { animation-delay: 0.1s; }
.col-lg-4:nth-child(2) { animation-delay: 0.2s; }
.col-lg-4:nth-child(3) { animation-delay: 0.3s; }
.col-lg-4:nth-child(4) { animation-delay: 0.4s; }
.col-lg-4:nth-child(5) { animation-delay: 0.5s; }
.col-lg-4:nth-child(6) { animation-delay: 0.6s; }

/* ================================
   Loading Overlay Enhancement
   ================================ */

.overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.overlay i {
    color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   Alert/Validation Enhancement
   ================================ */

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
    animation: slideInUp 0.3s ease;
}

.is-invalid {
    border-color: var(--danger-color) !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: var(--transition-base);
    position: relative;
}

.nav-tabs .nav-link.active {
    color: var(--accent-color);
    background: transparent;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.nav-tabs .nav-link:hover:not(.active) {
    color: color-mix(in srgb, var(--accent-color), transparent 30%);
}

/* ================================
   Badge Enhancement
   ================================ */

.tech-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-base);
    text-decoration: none;
}

.tech-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
    color: white;
}

/* ================================
   Responsive Enhancements
   ================================ */

@media (max-width: 768px) {
    .bg-register {
        padding: 2rem 1.5rem;
        border-radius: var(--border-radius);
    }

    .title h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .platform-card {
        padding: 1.5rem;
    }
}

/* ================================
   Accessibility Enhancements
   ================================ */

:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   Section Title Enhancement
   ================================ */

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   Portfolio Meta Enhancement
   ================================ */

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-type {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: color-mix(in srgb, var(--accent-color), transparent 90%);
    color: var(--accent-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #fbbf24;
    font-weight: 600;
}

/* ================================
   Utility Classes
   ================================ */

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.shadow-hard {
    box-shadow: var(--shadow-xl);
}

.rounded-modern {
    border-radius: var(--border-radius);
}

.transition-smooth {
    transition: var(--transition-smooth);
}
