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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #dc2626 0%, #ffffff 50%, #16a34a 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.9) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(22, 163, 74, 0.9) 100%);
}

.header-content {
    position: relative;
    text-align: center;
    padding: 4rem 0;
}

.header-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.icon-large {
    font-size: 4rem;
    color: #1f2937;
    margin-right: 1rem;
}

.icon-medium {
    font-size: 3rem;
    color: #dc2626;
}

.header-title {
    font-size: 4rem;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header-subtitle {
    font-size: 1.25rem;
    color: #374151;
    max-width: 48rem;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    padding: 3rem 0;
}

.search-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.search-controls {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #d1d5db;
    font-size: 1.25rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.search-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #dc2626;
    border-color: transparent;
}

.category-wrapper {
    min-width: 200px;
}

.category-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.category-select:focus {
    outline: none;
    ring: 2px;
    ring-color: #dc2626;
    border-color: transparent;
}

.category-select option {
    background: #1f2937;
    color: #ffffff;
}

.add-competition-section {
    text-align: center;
}

.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #16a34a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Competitions Section */
.competitions-section {
    padding-bottom: 4rem;
}

.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.competition-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.competition-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.competition-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.competition-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.competition-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.competition-organizer {
    color: #d1d5db;
    font-size: 0.875rem;
}

.competition-description {
    color: #e5e7eb;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.competition-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.competition-detail.target-audience {
    color: #86efac;
}

.competition-detail.registration-fee {
    color: #fde047;
}

.rounds-section {
    margin-bottom: 1.5rem;
}

.rounds-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.round-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.round-card:last-child {
    margin-bottom: 0;
}

.round-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.round-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.round-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db;
}

.round-detail.date {
    color: #93c5fd;
}

.round-detail.location {
    color: #86efac;
}

.round-detail.deadline {
    color: #fca5a5;
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.info-title.advancement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-content {
    color: #d1d5db;
    font-size: 0.875rem;
}

.competition-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.competition-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 0;
}

.no-results-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.no-results-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.no-results-card p {
    color: #d1d5db;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 0;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ffffff;
}

.submission-form {
    padding: 0 2rem 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #d1d5db;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #16a34a;
    border-color: transparent;
}

.form-group select option {
    background: #1f2937;
    color: #ffffff;
}

.rounds-section {
    margin-bottom: 1.5rem;
}

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

.rounds-header label {
    color: #ffffff;
    font-weight: 600;
}

.add-round-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-round-btn:hover {
    background: #1d4ed8;
}

.round-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

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

.round-title {
    color: #ffffff;
    font-weight: 600;
}

.remove-round-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remove-round-btn:hover {
    color: #dc2626;
}

.round-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.round-field {
    display: flex;
    flex-direction: column;
}

.round-field label {
    color: #d1d5db;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.round-field input {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 0.875rem;
}

.round-field input::placeholder {
    color: #9ca3af;
}

.round-field input:focus {
    outline: none;
    ring: 1px;
    ring-color: #16a34a;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: #6b7280;
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background: #4b5563;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #16a34a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.footer-text {
    text-align: center;
    color: #6b7280;
    margin-bottom: 1rem;
}

.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-title {
        font-size: 2.5rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .search-controls {
        flex-direction: column;
    }
    
    .search-input-wrapper,
    .category-wrapper {
        min-width: auto;
    }
    
    .competitions-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .round-fields {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}