:root {
    --primary: #2d378c;
    --secondary: #b39ddb;
    --accent: #d1c4e9;
    --light: #ede5f5;
    --dark: #512da8;
    --success: #7e57c2;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --card-bg: white;
    --category-hover: #f2def6;
    --category-icon-bg: #d3b3d9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.trophy-pattern {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.08;
    font-size: 40px;
    color: white;
    animation: float 6s ease-in-out infinite;
}

.trophy-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.trophy-2 {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.trophy-3 {
    top: 40%;
    left: 8%;
    animation-delay: 2s;
}

.trophy-4 {
    top: 60%;
    right: 5%;
    animation-delay: 3s;
}

.trophy-5 {
    top: 80%;
    left: 15%;
    animation-delay: 4s;
}

.trophy-6 {
    top: 30%;
    right: 20%;
    animation-delay: 2.5s;
}

.podium-shape {
    position: absolute;
    width: 120px;
    height: 80px;
    opacity: 0.06;
    background: rgba(255, 255, 255, 0.1);
    clip-path: polygon(20% 100%, 40% 60%, 60% 60%, 80% 100%);
    animation: float 8s ease-in-out infinite;
}

.podium-1 {
    top: 85%;
    right: 25%;
    animation-delay: 1s;
}

.podium-2 {
    top: 75%;
    left: 25%;
    animation-delay: 3s;
}

.podium-3 {
    top: 95%;
    right: 30%;
    animation-delay: 5s;
}

.medal-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.medal-1 {
    top: 65%;
    left: 70%;
}

.medal-2 {
    top: 75%;
    left: 3%;
    animation-delay: 5s;
}

.medal-3 {
    top: 65%;
    right: 8%;
    animation-delay: 10s;
}

.medal-4 {
    top: 85%;
    left: 50%;
    animation-delay: 15s;
}

.star-burst {
    position: absolute;
    width: 30px;
    height: 30px;
    opacity: 0.1;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    animation: twinkle 4s ease-in-out infinite;
}

.star-1 {
    top: 12%;
    left: 30%;
    animation-delay: 0.5s;
}

.star-2 {
    top: 35%;
    right: 15%;
    animation-delay: 1.5s;
}

.star-3 {
    top: 50%;
    left: 10%;
    animation-delay: 2.5s;
}

.star-4 {
    top: 70%;
    right: 25%;
    animation-delay: 3.5s;
}

.star-5 {
    top: 90%;
    left: 40%;
    animation-delay: 1s;
}

.competition-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
    animation: slide 15s linear infinite;
}

.line-1 {
    top: 25%;
    width: 200px;
    left: -200px;
    animation-delay: 0s;
}

.line-2 {
    top: 45%;
    width: 250px;
    right: -250px;
    animation-delay: 5s;
    animation-direction: reverse;
}

.line-3 {
    top: 65%;
    width: 180px;
    left: -180px;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.2);
    }
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(100vw + 200px));
    }
}


.hero-section {
    text-align: center;
    padding: 80px 20px 60px;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(45, 55, 140, 0.2);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(45, 55, 140, 0.3);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    border: none;
    background: none;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.content-section {
    background: var(--accent);
    backdrop-filter: blur(10px);
    margin: 40px 20px 0;
    border-radius: 30px 30px 0 0;
    padding: 50px 20px;
    min-height: 60vh;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.target-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--success) 0%, var(--dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.categories-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(45, 55, 140, 0.1);
}

.category-btn.active {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 55, 140, 0.3);
}

.category-btn:not(.active) {
    background: var(--light);
    color: var(--dark);
}

.category-btn:not(.active):hover {
    background: var(--category-hover);
    transform: translateY(-1px);
}

.category-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 40px;
    align-items: stretch;
}

.competition-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transform: translateY(0);
    flex-direction: column;
    height: 100%;
}

.competition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--secondary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-header.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.card-header.yellow {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(234, 179, 8, 0.05) 100%);
}

.card-header.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.card-header.pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(236, 72, 153, 0.05) 100%);
}

.card-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--card-bg);
    border: 1px solid var(--border);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.card-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
}

.card-content {
    padding: 0 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.card-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    min-height: 40px;
    color: var(--text-secondary);
}

.stat-icon {
    font-size: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: auto;
    /* Push footer to bottom */
    margin-bottom: 10px;
}

.time-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.time-left.urgent {
    color: var(--error);
    font-weight: 600;
}

.apply-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.apply-btn:hover {
    background: #48448c;
    /* Example purple color - change to your preferred color */
    color: white;
    transform: scale(1.05);
}

.apply-btn.applied {
    background: var(--success);
}


.notification-dot {
    position: absolute;
    top: 5px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #ff4081;
    border-radius: 50%;
}

@media (max-width: 768px) {
    
    .hero-title {
        font-size: 2.5rem;
    }

    .categories-container {
        gap: 10px;
    }

    .category-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .competitions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}

.loading-skeleton {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.no-results {
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.no-results-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.clear-filters-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #f0f0f0;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}
/* Popup styles */
#application-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: opacity 0.3s ease;
    max-width: 350px;
}

/* Button states */
.apply-btn.applied {
    background-color: #4CAF50 !important;
    cursor: default;
}

.apply-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}