/* Modern CSS styles for the Bilan Calculator */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

body {
    background-color: #f8fafc;
    color: #333;
    line-height: 1.6;
    position: relative;
}

/* Loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loader-container.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3a7bd5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

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

header {
    text-align: center;
    padding: 35px 0;
    background: linear-gradient(135deg, #3a7bd5, #3a6073);
    color: white;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(58, 123, 213, 0.2);
    overflow: hidden;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    animation: pulse 15s infinite linear;
    z-index: 1;
}

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

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 0 30px;
}

.logo {
    font-size: 3rem;
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 2.3rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.info-panel, .upload-panel {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-panel h2, .upload-panel h2 {
    color: #2d5a9e;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    position: relative;
}

.info-panel h2::after, .upload-panel h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: #3a7bd5;
}

/* Steps styling */
.info-steps {
    margin-bottom: 30px;
}

.step {
    display: flex;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.step-icon {
    background-color: #ebf3ff;
    color: #3a7bd5;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 5px;
    color: #2d5a9e;
    font-size: 1.1rem;
}

.highlight {
    color: #e74c3c;
    font-weight: 500;
}

.info-panel ul {
    padding-left: 20px;
    margin-bottom: 20px;
    list-style-type: none;
}

.info-panel ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}

.info-panel ul li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #3a7bd5;
}

.requirements {
    background-color: #ebf3ff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #3a7bd5;
}

.requirements h3 {
    margin-bottom: 10px;
    color: #3a6073;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3a6073;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    background-color: #f8fafc;
    border: 2px dashed #ccd7e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: #3a7bd5;
    background-color: #f0f7ff;
}

.file-info {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
    padding: 5px 10px;
    background-color: #f5f7fa;
    border-radius: 5px;
    border-left: 3px solid #ccd7e6;
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-item {
    position: relative;
}

.checkbox-item input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.fancy-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: #fff;
    border: 2px solid #ccd7e6;
    border-radius: 5px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked + .fancy-checkbox .checkbox-icon {
    background-color: #3a7bd5;
    border-color: #3a7bd5;
    color: white;
}

input[type="checkbox"]:focus + .fancy-checkbox .checkbox-icon {
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
}

.checkbox-item input {
    margin-right: 8px;
}

.btn-generate {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #3a7bd5;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(58, 123, 213, 0.3);
}

.btn-generate:hover {
    background-color: #2d5a9e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(58, 123, 213, 0.4);
}

.btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(58, 123, 213, 0.3);
}

.btn-generate .btn-text {
    display: block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-generate .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.btn-generate:hover .btn-text {
    transform: translateY(-100%);
}

.btn-generate:hover .btn-hover {
    transform: translateY(0);
}

.btn-generate i {
    margin-right: 10px;
    font-size: 1rem;
}

.result-area {
    margin-top: 30px;
    padding: 25px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #3a7bd5;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.result-area.hidden {
    display: none;
}

.result-area.show {
    transform: translateY(0);
    opacity: 1;
}

.result-area h3 {
    color: #2d5a9e;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.status-success {
    color: #2ecc71;
    margin-bottom: 20px;
    padding: 12px 20px;
    background-color: #e8f8f0;
    border-radius: 8px;
    font-weight: 500;
}

.status-error {
    color: #e74c3c;
    margin-bottom: 20px;
    padding: 12px 20px;
    background-color: #fdf3f2;
    border-radius: 8px;
    font-weight: 500;
}

#downloadLinks {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#downloadLinks a {
    display: inline-flex;
    align-items: center;
    background-color: #2ecc71;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
    font-weight: 500;
}

#downloadLinks a:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.3);
}

#downloadLinks a i {
    margin-right: 12px;
    font-size: 1.1rem;
}

footer {
    margin-top: 50px;
    padding: 30px 0;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    background-color: #f0f7ff;
    border-radius: 15px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.8rem;
    color: #3a7bd5;
    background-color: rgba(58, 123, 213, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-info {
    flex: 1;
    min-width: 200px;
}

.footer-tagline {
    margin-top: 5px;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #3a7bd5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.footer-links a i {
    margin-right: 8px;
}

.footer-links a:hover {
    color: #2d5a9e;
    transform: translateY(-2px);
}

/* Notification styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 350px;
    z-index: 1000;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #2ecc71;
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-content i {
    font-size: 1.5rem;
    margin-right: 15px;
}

.notification.success i {
    color: #2ecc71;
}

.notification.error i {
    color: #e74c3c;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    margin-left: 15px;
    transition: all 0.2s;
}

.notification-close:hover {
    color: #333;
}

/* N-1 toggle switch styling */
.n1-option {
    margin: 20px 0;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #3a7bd5;
}

input:focus + .slider {
    box-shadow: 0 0 1px #3a7bd5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    font-weight: 500;
    color: #3a6073;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .info-panel, .upload-panel {
        width: 100%;
    }
}
