/* style.css - Styles for FreeFire Nickname Generator */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #567798;
    background: linear-gradient(to right, #567798 0%, #2f4159 46%, #2c3c51 64%, #435c77 100%);
    min-height: 100vh;
    color: #333;
}

/* Layout */
.wrapper {
    background: #fff;
    max-width: 1250px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

/* Header */
.main-header {
    background-color: #354861;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-icon {
    font-size: 30px;
    margin-right: 10px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Search Section */
.search-section {
    flex: 1;
    margin: 0 20px;
    max-width: 500px;
}

.search-wrapper {
    display: flex;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-btn {
    padding: 12px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #ff5252;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.dropdown-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 200px;
    display: none;
    margin-top: 5px;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #ff6b6b;
}

/* Main Content */
.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Box Styles */
.box {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.box-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
}

.box-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.box-body {
    padding: 20px;
}

/* Nickname Grid */
.nickname-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.nickname-card {
    background: #f8f9fa;
    border: 2px solid transparent;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.nickname-card:hover {
    border-color: #ff6b6b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,107,107,0.3);
}

.nickname-card.copied {
    background: #d4edda;
    border-color: #28a745;
}

.nickname-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    word-break: break-all;
}

.nickname-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.vote-stats {
    font-size: 12px;
    margin-top: 5px;
}

.vote-green {
    color: #28a745;
    margin-right: 10px;
}

.vote-red {
    color: #dc3545;
}

.copy-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6b6b;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.nickname-card:hover .copy-indicator {
    opacity: 1;
}

/* Generate Button */
.generate-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}

/* Search Results Section */
.search-results-section {
    margin-bottom: 30px;
}

.search-results-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-search {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.clear-search:hover {
    background: rgba(255,255,255,0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    display: none;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.toast.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        bottom: -50px;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 10px;
    }

    .logo {
        font-size: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        background: #354861;
        width: 250px;
        height: calc(100vh - 60px);
        flex-direction: column;
        padding: 20px;
        transition: right 0.3s;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    }

    .nav-menu.active {
        right: 0;
    }

    .search-section {
        margin: 10px 0;
        max-width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.05);
        margin-top: 10px;
    }

    .nickname-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 10px;
    }

    .generate-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .search-section {
        width: 100%;
    }

    .nickname-text {
        font-size: 16px;
    }

    .box-title {
        font-size: 18px;
    }
}