/* Animacje */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

/* Loader/Spinner */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 215, 0, 0.1);
    border-top-color: var(--accent-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animacja pulsowania */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Animacja slide-in */
.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animacja bounce */
.bounce {
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Animacja dla przycisków submit */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 3px solid transparent;
    border-top-color: var(--primary-dark);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Skeleton loading dla tabel */
.skeleton {
    background: linear-gradient(90deg, var(--secondary-dark) 25%, rgba(255, 215, 0, 0.1) 50%, var(--secondary-dark) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--secondary-dark);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-yellow);
    width: 0%;
    animation: progress 2s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}/* Reset i zmienne */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0a0e27;
    --secondary-dark: #1a1f3a;
    --accent-yellow: #ffd700;
    --text-light: #e0e0e0;
    --text-gray: #a0a0a0;
    --gradient-bg: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Nawigacja */
.navbar {
    background: var(--secondary-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-yellow);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--accent-yellow);
    font-size: 1.8rem;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--accent-yellow);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: var(--gradient-bg);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '⚡';
    position: absolute;
    font-size: 20rem;
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-yellow);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-gray);
}

/* Przyciski */
.btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 0.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: bold;
    border: 2px solid transparent;
}

.btn-primary {
    position: relative;
    display: inline-block;
    padding: 10px 24px; /* zmniejszony padding */
    font-size: 1rem; /* trochę mniejszy tekst */
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--accent-yellow);
    border: 2px solid var(--accent-yellow);
    border-radius: 10px; /* mniej wysoki zaokrąglenie */
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease; /* krótszy czas dla szybszej reakcji */
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    line-height: 1; /* wyrównanie tekstu w pionie */
}

/* Hover */
.btn-primary:hover {
    background: transparent;
    color: var(--accent-yellow);
    transform: translateY(-3px) scale(1.03); /* mniej wyskakuje */
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5), 0 0 15px rgba(255, 255, 0, 0.2) inset;
    border-color: var(--accent-yellow);
}

/* Pulsowanie */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Shine */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(120deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 60%);
    transform: rotate(45deg) translate(-100%, 0);
    transition: all 0.7s ease;
    pointer-events: none; /* żeby nie przeszkadzało w klikaniu */
}

.btn-primary:hover::after {
    transform: rotate(45deg) translate(100%, 0);
}

/* Tekst */
.btn-primary span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-primary:hover span {
    transform: scale(1.08) rotate(-1.5deg);
}


.btn-secondary {
    position: relative;
    display: inline-block;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--accent-yellow);
    background: transparent;
    border: 2px solid var(--accent-yellow);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* Hover */
.btn-secondary:hover {
    background: var(--accent-yellow);
    color: var(--primary-dark);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4), 0 0 15px rgba(255, 255, 0, 0.2) inset;
    border-color: var(--accent-yellow);
}

/* Pulsowanie */
@keyframes pulse-secondary {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.3);
    }
    70% {
        box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Shine */
.btn-secondary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(120deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 60%);
    transform: rotate(45deg) translate(-100%, 0);
    transition: all 0.7s ease;
    pointer-events: none;
}

.btn-secondary:hover::after {
    transform: rotate(45deg) translate(100%, 0);
}

/* Tekst */
.btn-secondary span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-secondary:hover span {
    transform: scale(1.08) rotate(-1.5deg);
}

/* Sekcje */
.about, .science {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-yellow);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: var(--accent-yellow);
    margin: 1rem auto;
}

/* Karty */
.about-grid, .science-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.about-card, .science-card {
    background: var(--secondary-dark);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.about-card:hover, .science-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-yellow);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3, .science-card h3 {
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}

/* Formularze */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--secondary-dark);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-yellow);
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--primary-dark);
    border: 2px solid #333;
    border-radius: 5px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Tabele */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

table {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--secondary-dark);
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

table th {
    background: var(--primary-dark);
    color: var(--accent-yellow);
    padding: 0.8rem;
    text-align: left;
    white-space: nowrap;
    font-size: 0.95rem;
}

table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #333;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Kolumna ID - bardzo wąska */
table th:nth-child(1),
table td:nth-child(1) {
    width: 50px;
    text-align: center;
}

/* Kolumna Data - wąska */
table th:nth-child(2),
table td:nth-child(2) {
    width: 140px;
    white-space: nowrap;
}

/* Pozostałe kolumny - automatyczna szerokość z ograniczeniem */
table td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kolumna Akcje - zawsze na końcu, szersza */
table th:last-child,
table td:last-child {
    width: 350px;
    white-space: nowrap;
    max-width: none;
}

/* Efekt hover */
table tr:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* Formularze w komórkach - INLINE */
table td form {
    display: inline-block;
    margin: 0 2px;
    vertical-align: middle;
}

/* Przyciski w tabelach - MNIEJSZE */
table td .btn {
    padding: 0.4rem 0.7rem;
    margin: 0 2px;
    font-size: 0.8rem;
    display: inline-block;
    white-space: nowrap;
}

table td .btn-danger {
    padding: 0.4rem 0.7rem;
}

/* Select w tabelach - MNIEJSZY */
table td select {
    padding: 0.35rem 0.5rem;
    background: var(--primary-dark);
    border: 1px solid var(--accent-yellow);
    color: var(--text-light);
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 120px;
}

table td select:hover {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Responsywność dla małych ekranów */
@media (max-width: 1200px) {
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.5rem 0.6rem;
    }
}

@media (max-width: 768px) {
    .table-container {
        margin: 1rem -20px;
        border-radius: 0;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    table th,
    table td {
        padding: 0.4rem 0.5rem;
    }
    
    table td .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        margin: 1px;
    }
}

/* Alerty */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    border-left: 4px solid;
    position: relative;
    transition: all 0.3s ease;
}

.alert-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

.alert-success .alert-close {
    color: #00ff00;
}

.alert-error {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
    color: #ff0000;
}

.alert-error .alert-close {
    color: #ff0000;
}

.alert-info {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.alert-info .alert-close {
    color: var(--accent-yellow);
}

/* Stopka */
.footer {
    background: var(--secondary-dark);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: var(--text-gray);
}

/* Animacje */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

/* Panel administratora */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.admin-card {
    background: var(--secondary-dark);
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid var(--accent-yellow);
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-oczekujace { background: #ff9800; color: #000; }
.status-zaakceptowane { background: #4caf50; color: #fff; }
.status-odrzucone { background: #f44336; color: #fff; }
.status-w_realizacji { background: #2196f3; color: #fff; }
.status-zakonczone { background: #9e9e9e; color: #fff; }

/* Responsywność */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-dark);
        flex-direction: column;
        padding: 1rem;
        display: none;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-grid, .science-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .btn {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Kontener panelu admina - WĘŻSZY */
.admin-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

/* Sekcja about w panelu admina */
section.about {
    max-width: 100%;
    overflow-x: hidden;
}

/* Wszystkie zakładki */
.tab-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Nagłówek sekcji */
.section-title {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}