/* HELLP Syndrome Predictor - Професионален медицински калкулатор */
:root {
    --hellp-primary: #9c27b0;
    --hellp-primary-light: #e1bee7;
    --hellp-secondary: #f3e5f5;
    --hellp-danger: #c62828;
    --hellp-warning: #ff8f00;
    --hellp-success: #2e7d32;
    --hellp-info: #1565c0;
    --hellp-light: #f8f9fa;
    --hellp-dark: #212529;
    --hellp-gray: #6c757d;
    --hellp-accent: #f8f9fa;
    --hellp-border-radius: 12px;
    --hellp-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hellp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hellp-container {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #fce4ec, #f3e5f5);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--hellp-border-radius);
    box-shadow: var(--hellp-shadow);
    position: relative;
}

.hellp-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(252, 228, 236, 0.95), rgba(243, 229, 245, 0.95));
    border-radius: var(--hellp-border-radius);
    z-index: -1;
}

.hellp-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--hellp-border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.hellp-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--hellp-primary), var(--hellp-accent));
}

.hellp-header h1 {
    color: var(--hellp-primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.hellp-version-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--hellp-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.hellp-header p {
    color: var(--hellp-gray);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.hellp-language-selector {
    text-align: center;
    margin-bottom: 30px;
}

.hellp-language-selector select {
    padding: 8px 20px;
    border: 2px solid var(--hellp-primary-light);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--hellp-transition);
    font-weight: 500;
    color: var(--hellp-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hellp-language-selector select:hover,
.hellp-language-selector select:focus {
    border-color: var(--hellp-primary);
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
    outline: none;
    transform: translateY(-1px);
}

.hellp-calculator-card {
    background: white;
    border-radius: var(--hellp-border-radius);
    box-shadow: var(--hellp-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--hellp-transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.hellp-calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.hellp-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.hellp-form-group {
    margin-bottom: 0;
}

.hellp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--hellp-dark);
    font-size: 1.1rem;
}

.hellp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hellp-input-wrapper input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--hellp-transition);
    background: #fafafa;
    padding-right: 60px;
}

.hellp-input-wrapper input:focus {
    border-color: var(--hellp-primary);
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
    outline: none;
    background: white;
    transform: translateY(-1px);
}

.hellp-input-unit {
    position: absolute;
    right: 15px;
    color: var(--hellp-gray);
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
}

.hellp-input-info {
    font-size: 0.8rem;
    color: var(--hellp-gray);
    margin-top: 5px;
    font-style: italic;
}

.hellp-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.hellp-reset-btn,
.hellp-calculate-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--hellp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hellp-reset-btn {
    background: #f8f9fa;
    color: var(--hellp-dark);
    border: 2px solid #e9ecef;
}

.hellp-reset-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hellp-calculate-btn {
    background: linear-gradient(135deg, var(--hellp-primary), var(--hellp-accent));
    color: white;
    flex: 1;
    max-width: 300px;
}

.hellp-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.4);
}

.hellp-calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.4);
}

.hellp-results-card {
    background: white;
    border-radius: var(--hellp-border-radius);
    box-shadow: var(--hellp-shadow);
    padding: 30px;
    margin-bottom: 30px;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

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

.hellp-results-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--hellp-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hellp-results-header h2 {
    color: var(--hellp-primary);
    font-size: 1.8rem;
    margin-bottom: 0;
}

.hellp-close-results {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--hellp-gray);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--hellp-transition);
}

.hellp-close-results:hover {
    background: #f8f9fa;
    color: var(--hellp-dark);
}

.hellp-results-summary {
    background: var(--hellp-secondary);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid var(--hellp-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hellp-results-summary h3 {
    color: var(--hellp-primary);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.hellp-chart-container {
    height: 300px;
    margin: 30px 0;
    position: relative;
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
}

.hellp-interpretations-section h3 {
    color: var(--hellp-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--hellp-secondary);
    padding-bottom: 10px;
}

.hellp-interpretation-item {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid;
    transition: var(--hellp-transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.hellp-interpretation-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.1;
}

.hellp-interpretation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hellp-interpretation-very-high {
    background-color: #ffcdd2;
    border-left-color: var(--hellp-danger);
}

.hellp-interpretation-high {
    background-color: #ffebee;
    border-left-color: #e91e63;
}

.hellp-interpretation-medium-high {
    background-color: #fff3e0;
    border-left-color: var(--hellp-warning);
}

.hellp-interpretation-medium {
    background-color: #fff8e1;
    border-left-color: #ffc107;
}

.hellp-interpretation-low-medium {
    background-color: #e8f5e9;
    border-left-color: #81c784;
}

.hellp-interpretation-low {
    background-color: #dcedc8;
    border-left-color: var(--hellp-success);
}

.hellp-interpretation-item h4 {
    margin-bottom: 10px;
    color: var(--hellp-dark);
    font-size: 1.3rem;
}

.hellp-interpretation-item p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.hellp-risk-indicator {
    font-weight: 700;
    color: #880e4f;
    font-size: 1.2rem;
    background: rgba(136, 14, 79, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.hellp-extra-info {
    font-style: italic;
    color: var(--hellp-gray);
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    margin-top: 10px;
    border-left: 3px solid currentColor;
    opacity: 0.8;
}

.hellp-footer {
    text-align: center;
    padding: 20px;
    color: var(--hellp-gray);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--hellp-border-radius);
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hellp-footer a {
    color: var(--hellp-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 3px;
    transition: var(--hellp-transition);
}

.hellp-footer a:hover {
    text-decoration: underline;
    background: rgba(156, 39, 176, 0.1);
}

.hellp-medical-disclaimer {
    font-size: 0.8rem;
    margin-top: 10px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 5px;
    border-left: 3px solid var(--hellp-warning);
}

.hellp-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--hellp-primary);
    font-style: italic;
    font-size: 1.1rem;
}

.hellp-loading::before {
    content: "⏳";
    display: block;
    font-size: 2rem;
    margin-bottom: 15px;
}

.hellp-error {
    color: var(--hellp-danger);
    font-weight: 600;
    text-align: center;
    padding: 20px;
    background: #ffebee;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
    margin: 20px 0;
}

.hellp-success {
    color: var(--hellp-success);
    font-weight: 600;
    text-align: center;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
}

.hellp-results-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.hellp-print-results,
.hellp-export-results {
    padding: 10px 20px;
    border: 2px solid var(--hellp-primary);
    background: white;
    color: var(--hellp-primary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--hellp-transition);
}

.hellp-print-results:hover,
.hellp-export-results:hover {
    background: var(--hellp-primary);
    color: white;
    transform: translateY(-1px);
}

/* Модал стилови */
.hellp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--hellp-transition);
}

.hellp-modal.active {
    opacity: 1;
    visibility: visible;
}

.hellp-modal-content {
    background: white;
    border-radius: var(--hellp-border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--hellp-transition);
}

.hellp-modal.active .hellp-modal-content {
    transform: scale(1);
}

.hellp-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hellp-modal-header h3 {
    color: var(--hellp-primary);
    margin: 0;
}

.hellp-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--hellp-gray);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--hellp-transition);
}

.hellp-modal-close:hover {
    background: #f8f9fa;
    color: var(--hellp-dark);
}

.hellp-modal-body {
    padding: 20px;
}

.hellp-modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--hellp-dark);
}

.hellp-modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.hellp-modal-accept {
    padding: 12px 24px;
    background: var(--hellp-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--hellp-transition);
}

.hellp-modal-accept:hover {
    background: var(--hellp-accent);
    transform: translateY(-1px);
}

/* Респонзивен дизајн */
@media (max-width: 768px) {
    .hellp-header h1 {
        font-size: 2rem;
    }
    
    .hellp-header p {
        font-size: 1rem;
    }
    
    .hellp-version-badge {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
    
    .hellp-calculator-card, .hellp-results-card {
        padding: 20px;
    }
    
    .hellp-form-grid {
        grid-template-columns: 1fr;
    }
    
    .hellp-container {
        padding: 10px;
    }
    
    .hellp-form-actions {
        flex-direction: column;
    }
    
    .hellp-reset-btn,
    .hellp-calculate-btn {
        width: 100%;
    }
    
    .hellp-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hellp-close-results {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}

/* Пристапност */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Стилови за фокус за пристапност */
a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid var(--hellp-primary);
    outline-offset: 2px;
}

/* Стилови за печатење */
@media print {
    .hellp-container {
        background: white;
        box-shadow: none;
        padding: 0;
    }
    
    .hellp-calculator-card,
    .hellp-results-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .hellp-calculate-btn,
    .hellp-language-selector,
    .hellp-form-actions,
    .hellp-results-footer,
    .hellp-close-results,
    .hellp-footer a:not(#hellp-footer-disclaimer) {
        display: none;
    }
    
    .hellp-header {
        border: none;
        box-shadow: none;
        background: white;
    }
    
    .hellp-version-badge {
        display: none;
    }
    
    .hellp-modal {
        display: none !important;
    }
    
    .hellp-medical-disclaimer {
        font-size: 0.7rem;
    }
}

/* Теми */
.hellp-theme-dark {
    background: linear-gradient(135deg, #2d1b33, #1a1a2e);
    color: #e0e0e0;
}

.hellp-theme-dark .hellp-container::before {
    background: linear-gradient(135deg, rgba(45, 27, 51, 0.95), rgba(26, 26, 46, 0.95));
}

.hellp-theme-dark .hellp-header,
.hellp-theme-dark .hellp-calculator-card,
.hellp-theme-dark .hellp-results-card,
.hellp-theme-dark .hellp-footer {
    background: rgba(40, 40, 60, 0.9);
    color: #e0e0e0;
}

.hellp-theme-dark .hellp-input-wrapper input,
.hellp-theme-dark .hellp-language-selector select {
    background: rgba(60, 60, 80, 0.8);
    color: #e0e0e0;
    border-color: #555;
}

.hellp-theme-dark .hellp-input-wrapper input:focus {
    background: rgba(70, 70, 90, 0.9);
}

.hellp-theme-dark .hellp-results-summary {
    background: rgba(156, 39, 176, 0.1);
}

.hellp-theme-dark .hellp-footer a {
    color: #bb86fc;
}

.hellp-theme-dark .hellp-medical-disclaimer {
    background: rgba(255, 193, 7, 0.1);
    color: #ffca28;
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hellp-calculate-btn:active {
    animation: pulse 0.3s ease-in-out;
}

/* Админ стилови */
.hellp-admin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.hellp-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.hellp-admin-card h2 {
    color: var(--hellp-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hellp-secondary);
}

.hellp-logs-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

.hellp-logs-table {
    width: 100%;
    border-collapse: collapse;
}

.hellp-logs-table th,
.hellp-logs-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.hellp-logs-table th {
    background-color: var(--hellp-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.hellp-logs-table tr:hover {
    background-color: #f8f9fa;
}

.hellp-shortcode {
    background: #f1f1f1;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.hellp-shortcode:hover {
    background: #e1e1e1;
}
