@property --bg-alpha1 {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

@property --bg-alpha2 {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lexend', sans-serif;
}

body {
    background-image: linear-gradient(rgba(255,255,255,var(--bg-alpha1)), rgba(255,255,255,var(--bg-alpha2))), url('img/bg/1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: --bg-alpha1 1s ease, --bg-alpha2 1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body.result-view {
    align-items: flex-start;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
    transition: max-width 0.3s ease;
}

.container.full-width {
    max-width: none;
}

.search-container {
    width: 100%;
    position: relative;
    opacity: 0;
}

.search-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    border-radius: 50px;
    padding: 2px;
    background: transparent;
    transition: all 0.3s ease;
}

.search-input-wrapper.glow-1 {
    position: relative;
    background: transparent;
    padding: 2px;
    box-shadow: 0 0 5px rgba(255, 179, 255, 0.2);
}

.search-input-wrapper.glow-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from var(--gradient-angle), #ffb3b3, #ffcc99, #ffffb3, #b3ffb3, #b3b3ff, #d9b3ff, #ffb3ff, #ffb3b3);
    border-radius: inherit;
    animation: rainbow-spin 5s ease infinite;
    z-index: -1;
}

.search-input-wrapper.glow-2 {
    position: relative;
    background: transparent;
    padding: 3px;
    box-shadow: 0 0 10px rgba(255, 179, 255, 0.4);
}

.search-input-wrapper.glow-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from var(--gradient-angle), #ffb3b3, #ffcc99, #ffffb3, #b3ffb3, #b3b3ff, #d9b3ff, #ffb3ff, #ffb3b3);
    border-radius: inherit;
    animation: rainbow-spin 5s ease infinite;
    z-index: -1;
}


.search-input-wrapper.glow-3 {
    position: relative;
    background: transparent;
    padding: 4px;
    box-shadow: 0 0 15px rgba(255, 179, 255, 0.6);
}

.search-input-wrapper.glow-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from var(--gradient-angle), #ffb3b3, #ffcc99, #ffffb3, #b3ffb3, #b3b3ff, #d9b3ff, #ffb3ff, #ffb3b3);
    border-radius: inherit;
    /* animation-timing-function options besides linear: 
       ease, ease-in, ease-out, ease-in-out, step-start, step-end, steps(), cubic-bezier() */
    animation: rainbow-spin 5s ease infinite;
    z-index: -1;
}

@keyframes rainbow-spin {
    0% {
        --gradient-angle: 0deg;
    }
    100% {
        --gradient-angle: 360deg;
    }
}



.search-input {
    width: 100%;
    padding: 20px 25px;
    font-size: 18px;
    border: none;
    border-radius: 47px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: all 0.3s ease;
    background: white;
    display: block;
}

.search-input:focus {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.search-input::placeholder {
    color: #aaa;
}

.search-container.result-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(2px);
    padding: 15px 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    max-width: none;
}

.search-container.result-mode .search-input-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.search-container.result-mode .search-input {
    padding: 15px 20px;
    font-size: 16px;
}

.search-container.result-mode .suggestions-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input:focus {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.search-input::placeholder {
    color: #aaa;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 330px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestion-item {
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

.suggestion-item:hover, .suggestion-item.selected {
    background-color: #f8f9fa;
}

.country-name {
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
}

.city-name {
    color: #7f8c8d;
    text-align: left;
}

.country-only .city-name {
    display: none;
}

.country-only .country-name {
    width: 100%;
    font-size: 18px;
    text-align: left;
}

.result-page {
    text-align: center;
    padding: 40px;
    font-size: 24px;
    color: #2c3e50;
    display: none;
}

.container.full-width .result-page {
    padding-top: 100px; /* Account for fixed search bar */
}

@media (max-width: 768px) {
    .search-input {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .suggestion-item {
        padding: 14px 20px;
    }
    
    .search-container.result-mode {
        padding: 10px 15px;
    }
    
    .search-container.result-mode .search-input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .container.full-width .result-page {
        padding-top: 80px;
    }
}

/* User Display Styles */
.users-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.users-header h2 {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.users-header p {
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 20px;
}

.back-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.back-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.no-users-container {
    text-align: center;
    padding: 60px 20px;
}

.no-users-container h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 15px;
}

.no-users-container p {
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 30px;
}

/* Masonry Grid Layout */
.users-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.user-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.user-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.user-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Portfolio Container */
.portfolio-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.portfolio-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.user-card:hover .portfolio-image {
    transform: scale(1.05);
}

/* Portfolio Navigation */
.portfolio-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-navigation.visible {
    opacity: 1;
    pointer-events: all;
}

.portfolio-nav {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.portfolio-nav svg {
    width: 20px;
    height: 20px;
    color: #2c3e50;
}

/* Portfolio Indicators */
.portfolio-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* User Info Section */
.user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #ecf0f1;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-location {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .users-masonry-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .users-header h2 {
        font-size: 24px;
    }
    
    .users-header p {
        font-size: 16px;
    }
    
    .users-masonry-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
    
    .portfolio-container {
        height: 250px;
    }
    
    .user-info {
        padding: 15px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .user-location {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .users-masonry-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-container {
        height: 300px;
    }
    
    .portfolio-nav {
        width: 40px;
        height: 40px;
    }
    
    .portfolio-nav svg {
        width: 18px;
        height: 18px;
    }
}