/* Стили для секции проверки лицензии */
.license-check-section {
    margin: 1rem auto 2rem;
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.license-check-accordion {
    background: linear-gradient(135deg, rgba(25, 25, 35, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1001;
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
}

.license-header:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, transparent 100%);
}

.license-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
    text-align: center;
}

.license-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.license-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.license-header h3 {
    color: #ffd700;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.license-subtitle {
    color: #ccc;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-align: center;
}

.license-toggle-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: #000;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.license-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.license-toggle-btn[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.license-form-container {
    padding: 0 2rem 1rem;
    position: relative;
    z-index: 1002;
}

.license-description {
    color: #ccc;
    margin: 0.5rem 0;
    line-height: 1.4;
    text-align: center;
    font-size: 0.8rem;
    order: 2;
}

.license-form {
    margin-bottom: 1.5rem;
    margin-top: 10px; /* Опускаем форму на 10px вниз */
}

.license-input-group {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.license-key-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.license-key-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.license-key-input::placeholder {
    color: #888;
    text-transform: none;
    letter-spacing: normal;
}

.license-verify-btn {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    border: none;
    border-radius: 12px;
    padding: 0 1.5rem;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.license-verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.4);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Всплывающее окно результатов - ИЗМЕНЕНО: убрано фиксированное позиционирование */
.license-result-popup {
    position: relative;
    background: rgba(15, 15, 25, 0.98);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: 1003;
    width: 100%;
    max-height: none;
    overflow: visible;
    backdrop-filter: blur(10px);
    margin-top: 1rem;
    display: none;
}

.license-result-popup.active {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

.popup-content {
    position: relative;
}

.popup-close {
    position: absolute;
    top: -1rem;
    right: -1rem;
    background: rgba(255, 215, 0, 0.9);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1004;
}

.popup-close:hover {
    transform: rotate(90deg) scale(1.1);
}

.popup-close svg {
    width: 20px;
    height: 20px;
    fill: #000;
}

.license-result-popup .result-success,
.license-result-popup .result-error {
    border-left: none;
    background: transparent;
    padding: 0;
}

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

.success-icon, .error-icon {
    font-size: 2rem;
}

.result-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
}

.certificate-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.certificate-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.certificate-label {
    color: #ffd700;
    font-weight: 600;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.certificate-value {
    color: #fff;
    flex: 1;
    line-height: 1.4;
    font-size: 0.9rem;
}

.certificate-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255, 215, 0, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #ffd700;
    margin-top: 1rem;
}

.warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.certificate-warning p {
    margin: 0;
    color: #ccc;
    line-height: 1.4;
    font-size: 0.85rem;
}

.error-list {
    color: #fff;
    margin: 1rem 0 0 1rem;
    padding: 0;
    font-size: 0.9rem;
}

.error-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* УДАЛЕНО: оверлей для всплывающего окна */

/* Анимации */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.license-form-container[aria-hidden="false"] {
    animation: slideDown 0.5s ease forwards;
}

/* Плавные анимации для успеха и ошибки */
@keyframes successGlow {
    0% { background-color: rgba(0, 255, 0, 0.1); }
    50% { background-color: rgba(0, 255, 0, 0.2); }
    100% { background-color: rgba(0, 255, 0, 0.1); }
}

@keyframes errorGlow {
    0% { background-color: rgba(255, 0, 0, 0.1); }
    50% { background-color: rgba(255, 0, 0, 0.2); }
    100% { background-color: rgba(255, 0, 0, 0.1); }
}

.result-success {
    animation: successGlow 3s ease-in-out infinite;
}

.result-error {
    animation: errorGlow 3s ease-in-out infinite;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .license-check-section {
        margin: 1rem;
        max-width: none;
    }
    
    .license-check-accordion {
        border-radius: 12px;
    }
    
    .license-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .license-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .license-header h3 {
        font-size: 1.2rem;
    }
    
    .license-subtitle {
        font-size: 0.7rem;
    }
    
    .license-form-container {
        padding: 0 1rem 1rem;
    }
    
    .license-input-group {
        flex-direction: column;
    }
    
    .license-key-input {
        font-size: 0.9rem;
        padding: 0.75rem;
        text-align: center;
    }
    
    .license-verify-btn {
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .certificate-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .certificate-label {
        min-width: auto;
        text-align: center;
        font-size: 0.85rem;
    }
    
    .certificate-value {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .license-description.desktop-only {
        display: none;
    }
    
    .license-result-popup {
        padding: 1.25rem;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .result-header h4 {
        font-size: 1.2rem;
    }
    
    .popup-close {
        top: -0.5rem;
        right: -0.5rem;
        width: 2rem;
        height: 2rem;
    }
    
    .certificate-warning {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Эффект "вау" для ввода */
.license-key-input:focus {
    animation: inputFocus 0.5s ease;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Компактное расположение для формы */
.license-form-wrapper {
    display: flex;
    flex-direction: column;
}

.license-form-wrapper .license-description {
    order: 2;
    margin-top: 0.5rem;
}

/* Стили для проверки по файлу */
.file-check-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.file-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
    color: #ccc;
    font-size: 0.9rem;
}

.file-divider::before,
.file-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-divider span {
    padding: 0 10px;
}

.file-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.file-input-label:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
}

.file-icon {
    width: 24px;
    height: 24px;
    fill: #ffd700;
}

.file-input-text {
    color: #ccc;
    font-size: 0.9rem;
}

.generate-hash-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.generate-hash-btn:not(:disabled):hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.generate-hash-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.hash-icon {
    width: 20px;
    height: 20px;
    fill: white;
}

.hash-result {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
}

.hash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #ffd700;
    font-weight: 600;
}

.copy-hash-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.copy-hash-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-hash-btn svg {
    width: 16px;
    height: 16px;
    fill: #ccc;
}

.hash-value {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    max-height: 100px;
    overflow-y: auto;
}

.verify-hash-btn {
    width: 100%;
    padding: 0.5rem;
    background: linear-gradient(135deg, #2196F3 0%, #0d47a1 100%);
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-hash-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

/* Анимация загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

/* Мобильная адаптация для новой секции */
@media (max-width: 768px) {
    .file-input-label {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0.5rem;
    }
    
    .hash-value {
        font-size: 0.7rem;
    }
}

/* Стили для проверки по файлу */
.file-check-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.file-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
    color: #ccc;
    font-size: 0.9rem;
}

.file-divider::before,
.file-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-divider span {
    padding: 0 10px;
}

.file-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.file-input-label:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
}

.file-icon {
    width: 24px;
    height: 24px;
    fill: #ffd700;
}

.file-input-text {
    color: #ccc;
    font-size: 0.9rem;
}

.verify-file-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.verify-file-btn:not(:disabled):hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.verify-file-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.verify-icon {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Стили для отображения найденного LICENSE-KEY */
.license-key-found {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.license-key-label {
    color: #ffd700;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.license-key-value {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 8px;
}

/* Анимация загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

/* Мобильная адаптация для новой секции */
@media (max-width: 768px) {
    .file-input-label {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0.5rem;
    }
    
    .license-key-value {
        font-size: 0.9rem;
    }
}

/* Стили для списка обязательств */
.obligations-row {
    align-items: flex-start;
}

#license-obligations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.obligation-item {
    display: block;
    line-height: 1.4;
}

.obligation-item::before {
    content: '▪';
    color: #ffd700;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Улучшенные стили для отображения найденного LICENSE-KEY */
.license-key-found {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.license-key-label {
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.license-key-value {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    #license-obligations {
        gap: 0.4rem;
    }
    
    .obligation-item {
        font-size: 0.9rem;
    }
    
    .license-key-value {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .license-key-label {
        font-size: 1rem;
    }
}