/* frontend/css/style.css - Styl dla Q4Rail.com (dostosowany dla monitoringu) */
:root {
    --q4r-primary: #152a5e;
    --q4r-accent: #ff7c00;
    --q4r-light: #f8f9fa;
    --q4r-dark: #333333;
    --q4r-white: #ffffff;
    --q4r-success: #28a745;
    --q4r-error: #dc3545;
    --q4r-warning: #ffc107;
    --q4r-info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--q4r-dark);
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    background: var(--q4r-white);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(21, 42, 94, 0.12);
    overflow: hidden;
    border-top: 6px solid var(--q4r-accent);
}

.header {
    background: linear-gradient(135deg, var(--q4r-primary) 0%, #1a3a7a 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--q4r-accent);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 1rem;
}

.logo-image {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    opacity: 0.95;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.format-info {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(5px);
}

.format-info i {
    color: var(--q4r-accent);
    font-size: 1.2rem;
}

.main {
    padding: 2.5rem;
}

.card {
    background: var(--q4r-white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 20px rgba(21, 42, 94, 0.08);
    border: 1px solid rgba(21, 42, 94, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(21, 42, 94, 0.12);
}

.card h2 {
    color: var(--q4r-primary);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 0.8rem;
}

.card h2 i {
    color: var(--q4r-accent);
}

.input-group {
    display: flex;
    gap: 15px;
    margin: 1.5rem 0;
}

input {
    flex: 1;
    padding: 15px 18px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
    background: #fcfdff;
}

input:focus {
    border-color: var(--q4r-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(21, 42, 94, 0.15);
    background: white;
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--q4r-accent) 0%, #ff8c29 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 124, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e06c00 0%, #ff7c00 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 124, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--q4r-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(21, 42, 94, 0.2);
}

.btn-secondary:hover {
    background: #0f1f4d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(21, 42, 94, 0.25);
}

.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(21, 42, 94, 0.1);
    border-top: 5px solid var(--q4r-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid var(--q4r-accent);
}

.result a {
    color: var(--q4r-primary);
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.result a:hover {
    text-decoration: underline;
    color: var(--q4r-accent);
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: var(--q4r-error);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--q4r-error);
    margin-top: 15px;
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95rem;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5eb;
}

th {
    background-color: #f0f4fa;
    color: var(--q4r-primary);
    font-weight: 600;
}

tr:hover {
    background-color: #f9fbfd;
}

td a {
    color: var(--q4r-primary);
    text-decoration: none;
}

td a:hover {
    color: var(--q4r-accent);
    text-decoration: underline;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.info-card {
    background: var(--q4r-white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-top: 4px solid var(--q4r-primary);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.info-card i {
    font-size: 2.2rem;
    color: var(--q4r-primary);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--q4r-primary);
}

.info-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

.footer {
    background: var(--q4r-primary);
    color: white;
    padding: 1.8rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--q4r-accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

#api-status {
    font-weight: bold;
    color: #90ee90;
    background: rgba(144, 238, 144, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.version {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hidden {
    display: none !important;
}

/* Responsywność */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        border-radius: 12px;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .main {
        padding: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .format-info {
        flex-wrap: wrap;
        text-align: center;
        padding: 10px;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 8px 10px;
    }
}