/* Auth Popup Styles */
.ck3-auth-popup {
    background-color: #1F1B27;
    border: 1px solid #262230;
    border-radius: 8px;
    padding: 30px;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: none;
}

.ck3-auth-popup.active {
    display: block;
}

.ck3-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.ck3-popup-overlay.active {
    display: block;
}

.ck3-auth-popup h3 {
    margin-top: 0;
    color: #FFFFFF;
    text-align: center;
    font-weight: normal;
}

.ck3-auth-popup input[type="text"],
.ck3-auth-popup input[type="email"],
.ck3-auth-popup input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #262230;
    border: none;
    border-radius: 4px;
    box-sizing: border-box;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
}

.ck3-auth-popup input::placeholder {
    color: #cccccc;
}

.ck3-auth-popup button {
    width: 100%;
    padding: 12px;
    background-color: #262230;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JejuMyeongjo', serif;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.ck3-auth-popup button:hover {
    background-color: #3a3547;
}

.ck3-auth-popup .remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.ck3-auth-popup .privacy-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.ck3-auth-popup .privacy-checkbox input,
.ck3-auth-popup .remember-me input {
    margin-right: 8px;
}

.ck3-auth-popup a {
    color: #b8a9e6;
    text-decoration: none;
}

.ck3-auth-popup a:hover {
    text-decoration: underline;
}

.ck3-auth-popup .switch-form {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9em;
}

.ck3-auth-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #FFFFFF;
    background: none;
    border: none;
    padding: 0;
    width: auto;
}

.ck3-auth-popup .close-popup:hover {
    color: #b8a9e6;
}

/* Catalog Styles */
.ck3-catalog-container {
    max-width: 736px;
    margin: 0 auto;
}

.ck3-heraldry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    justify-items: center;
}

.ck3-heraldry-item {
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

/* Эффект динамического свечения для гербов - универсальный */
.ck3-heraldry-item {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ck3-heraldry-item img {
    transition: all 0.4s ease;
    will-change: filter, transform;
    position: relative;
    z-index: 2;
}

/* Создаем эффект "прожектора" с многоцветным свечением */
.ck3-heraldry-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.4) 0%,
        rgba(255, 140, 0, 0.3) 20%,
        rgba(220, 20, 60, 0.25) 40%,
        rgba(147, 112, 219, 0.2) 60%,
        rgba(65, 105, 225, 0.15) 80%,
        transparent 100%
    );
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
    filter: blur(15px);
}

.ck3-heraldry-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Второй слой свечения для глубины */
.ck3-heraldry-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(135, 206, 250, 0.2) 30%,
        rgba(50, 205, 50, 0.15) 50%,
        rgba(255, 185, 0, 0.1) 70%,
        transparent 100%
    );
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(20px);
    animation-delay: 0.1s;
}

.ck3-heraldry-item:hover::after {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Усиление яркости и контраста самого изображения */
.ck3-heraldry-item:hover img {
    filter: brightness(1.15) contrast(1.1) saturate(1.2);
    transform: scale(1.03);
}

/* Мягкое внутреннее свечение на изображении */
.ck3-heraldry-item:hover {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 25px rgba(255, 215, 0, 0.4))
            drop-shadow(0 0 35px rgba(147, 112, 219, 0.3));
}

/* Анимация пульсации для живости эффекта */
@keyframes glow-pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.85;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.ck3-heraldry-item:hover::before {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Оптимизация производительности */
.ck3-heraldry-item,
.ck3-heraldry-item img,
.ck3-heraldry-item::before,
.ck3-heraldry-item::after {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Плавное появление при загрузке страницы */
.ck3-heraldry-item {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Добавляем задержку для каскадного появления */
.ck3-heraldry-item:nth-child(1) { animation-delay: 0.05s; }
.ck3-heraldry-item:nth-child(2) { animation-delay: 0.1s; }
.ck3-heraldry-item:nth-child(3) { animation-delay: 0.15s; }
.ck3-heraldry-item:nth-child(4) { animation-delay: 0.2s; }
.ck3-heraldry-item:nth-child(5) { animation-delay: 0.25s; }
.ck3-heraldry-item:nth-child(6) { animation-delay: 0.3s; }

/* Notification Toast */
.ck3-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #262230;
    color: #FFFFFF;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: slideIn 0.3s ease;
    font-family: 'JejuMyeongjo', serif;
}

.ck3-toast.success {
    border-left: 4px solid #4CAF50;
}

.ck3-toast.error {
    border-left: 4px solid #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   DASHBOARD UNIFIED STYLES
   ============================================ */

/* Dashboard Container */
.ck3-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'JejuMyeongjo', serif;
    color: #FFFFFF;
}

/* Dashboard Header */
.ck3-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #262230;
}

.ck3-dashboard-header h2 {
    color: #FFFFFF;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: normal;
}

.ck3-dashboard-subtitle {
    color: #999;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Dashboard Sections */
.ck3-dashboard-section {
    background-color: #1F1B27;
    border: 1px solid #262230;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.ck3-dashboard-section:hover {
    border-color: #3a3547;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ck3-dashboard-section h2 {
    color: #FFFFFF;
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: normal;
    border-bottom: 1px solid #262230;
    padding-bottom: 10px;
}

/* Dashboard Cards Grid */
.ck3-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.ck3-dashboard-card {
    background-color: #262230;
    border: 1px solid #3a3547;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    text-align: center;
}

.ck3-dashboard-card:hover {
    transform: translateY(-5px);
    border-color: #b8a9e6;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.ck3-dashboard-card h3 {
    color: #FFFFFF;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: normal;
}

.ck3-dashboard-card p {
    color: #999;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Dashboard Stats */
.ck3-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.ck3-stat-card {
    background: linear-gradient(135deg, #262230 0%, #1F1B27 100%);
    border: 1px solid #3a3547;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ck3-stat-number {
    color: #b8a9e6;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.ck3-stat-label {
    color: #999;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dashboard Buttons */
.ck3-dashboard-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #262230;
    color: #FFFFFF;
    border: 1px solid #3a3547;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JejuMyeongjo', serif;
    font-size: 1em;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.ck3-dashboard-btn:hover {
    background-color: #3a3547;
    border-color: #b8a9e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(184, 169, 230, 0.2);
    color: #FFFFFF;
    text-decoration: none;
}

.ck3-dashboard-btn.primary {
    background-color: #b8a9e6;
    color: #1F1B27;
    border-color: #b8a9e6;
}

.ck3-dashboard-btn.primary:hover {
    background-color: #a594e0;
    border-color: #a594e0;
}

/* Dashboard Forms */
.ck3-dashboard-form {
    background-color: #262230;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.ck3-form-group {
    margin-bottom: 20px;
}

.ck3-form-group label {
    display: block;
    color: #FFFFFF;
    margin-bottom: 8px;
    font-size: 1em;
}

.ck3-form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: #1F1B27;
    border: 1px solid #3a3547;
    border-radius: 4px;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    font-size: 1em;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ck3-form-control:focus {
    outline: none;
    border-color: #b8a9e6;
    box-shadow: 0 0 0 2px rgba(184, 169, 230, 0.2);
}

.ck3-form-control::placeholder {
    color: #666;
}

.ck3-add-heraldry-btn {
  /* Основные параметры */
  padding: 12px 24px;
  font-family: 'JejuMyeongjo', serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #f4e4c1;
  
  /* Фон с градиентом в стиле CK3 */
  background: linear-gradient(180deg, 
    #3a2814 0%, 
    #2a1f10 50%, 
    #1a120a 100%);
  
  /* Золотая рамка */
  border: 2px solid #8b6914;
  border-radius: 4px;
  box-shadow: 
    inset 0 1px 0 rgba(212, 175, 55, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(139, 105, 20, 0.2);
  
  /* Курсор и переходы */
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  overflow: hidden;
  
  /* Текстовая тень для объёма */
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(212, 175, 55, 0.3);
}

/* Внутреннее свечение перед текстом */
.ck3-add-heraldry-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, 
    rgba(212, 175, 55, 0.1) 0%, 
    transparent 50%);
  pointer-events: none;
}

/* Состояние hover */
.ck3-add-heraldry-btn:hover {
  background: linear-gradient(180deg, 
    #4a3418 0%, 
    #3a2814 50%, 
    #2a1f10 100%);
  
  border-color: #d4af37;
  color: #fff;
  
  box-shadow: 
    inset 0 1px 0 rgba(212, 175, 55, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(212, 175, 55, 0.4);
  
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(212, 175, 55, 0.6);
  
  transform: translateY(-1px);
}

/* Состояние active (нажатие) */
.ck3-add-heraldry-btn:active {
  background: linear-gradient(180deg, 
    #1a120a 0%, 
    #2a1f10 50%, 
    #3a2814 100%);
  
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.8),
    inset 0 -1px 0 rgba(212, 175, 55, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.6);
  
  transform: translateY(1px);
}

/* Состояние focus для доступности */
.ck3-add-heraldry-btn:focus {
  outline: none;
  box-shadow: 
    inset 0 1px 0 rgba(212, 175, 55, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(139, 105, 20, 0.2),
    0 0 0 3px rgba(212, 175, 55, 0.3);
}

/* Disabled состояние */
.ck3-add-heraldry-btn:disabled {
  background: linear-gradient(180deg, 
    #2a2a2a 0%, 
    #1a1a1a 50%, 
    #0a0a0a 100%);
  
  border-color: #4a4a4a;
  color: #666;
  cursor: not-allowed;
  
  box-shadow: none;
  text-shadow: none;
  
  transform: none;
}

.ck3-add-heraldry-btn:disabled:hover {
  transform: none;
}
/* Dashboard Tables */
.ck3-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #262230;
    border-radius: 8px;
    overflow: hidden;
}

.ck3-dashboard-table th,
.ck3-dashboard-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #3a3547;
}

.ck3-dashboard-table th {
    background-color: #1F1B27;
    color: #b8a9e6;
    font-weight: normal;
    font-size: 1em;
}

.ck3-dashboard-table td {
    color: #FFFFFF;
}

.ck3-dashboard-table tr:hover {
    background-color: #2a2535;
}

/* Dashboard Empty States */
.ck3-dashboard-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.ck3-dashboard-empty h3 {
    color: #666;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: normal;
}

.ck3-dashboard-empty p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .ck3-dashboard {
        padding: 20px 15px;
    }
    
    .ck3-dashboard-header h1 {
        font-size: 2em;
    }
    
    .ck3-dashboard-section {
        padding: 20px;
    }
    
    .ck3-dashboard-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ck3-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .ck3-dashboard-table {
        font-size: 0.9em;
    }
    
    .ck3-dashboard-table th,
    .ck3-dashboard-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .ck3-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .ck3-dashboard-header h1 {
        font-size: 1.8em;
    }
    
    .ck3-dashboard-section {
        padding: 15px;
    }
    
    .ck3-dashboard-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

.ck3-user-heraldry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.ck3-user-heraldry-item {
    text-align: center;
}

.ck3-user-heraldry-item img {
    width: 150px;
    height: 150px;
    border-radius: 4px;
    border: 1px solid #262230;
    object-fit: cover;
}

.ck3-user-heraldry-section h3 {
    color: #FFFFFF;
}

.ck3-user-heraldry-item h4 {
    margin-top: 10px;
    font-size: 0.9em;
    color: #FFFFFF;
}

/* Submit Heraldry Modal */
.ck3-submit-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1F1B27;
    border: 1px solid #262230;
    border-radius: 8px;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ck3-submit-modal.active {
    display: block;
}

.ck3-submit-modal h3 {
    margin-top: 0;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
}

.ck3-submit-modal textarea {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    padding: 12px;
    background-color: #262230;
    border: none;
    border-radius: 4px;
    color: #FFFFFF;
    font-family: monospace;
    resize: vertical;
    box-sizing: border-box;
}

.ck3-submit-modal button {
    padding: 12px 24px;
    background-color: #262230;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JejuMyeongjo', serif;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.ck3-submit-modal button:hover {
    background-color: #3a3547;
}

.ck3-submit-modal .close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #FFFFFF;
    background: none;
    border: none;
    padding: 0;
}

.ck3-submit-modal .close-modal:hover {
    color: #b8a9e6;
}

/* Account Settings Styles */
.ck3-account-settings {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ck3-account-settings h2 {
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-align: center;
    font-weight: normal;
}

.ck3-account-username {
    color: #b8a9e6;
    font-size: 1.2em;
    margin-bottom: 40px;
    text-align: center;
    font-family: 'JejuMyeongjo', serif;
}

/* Account Buttons Grid */
.ck3-account-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

/* Account Button Base Style */
.ck3-account-button {
    background: linear-gradient(135deg, #262230 0%, #1F1B27 100%);
    border: 2px solid #3a3547;
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Subtle gradient overlay */
.ck3-account-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at top,
        rgba(184, 169, 230, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.ck3-account-button:hover::before {
    opacity: 1;
}

/* Hover state with glow */
.ck3-account-button:hover {
    background: linear-gradient(135deg, #2a2535 0%, #1F1B27 100%);
    border-color: #b8a9e6;
    transform: translateY(-5px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(184, 169, 230, 0.2);
}

/* Icon styling with glow */
.ck3-account-button i {
    font-size: 56px;
    display: block;
    margin-bottom: 18px;
    color: #b8a9e6;
    transition: all 0.4s ease;
    text-shadow: 0 0 20px rgba(184, 169, 230, 0.3);
}

.ck3-account-button:hover i {
    color: #d4c5f9;
    transform: scale(1.1);
    text-shadow: 
        0 0 25px rgba(184, 169, 230, 0.6),
        0 0 35px rgba(184, 169, 230, 0.4);
}

/* Text label */
.ck3-account-button span {
    font-size: 17px;
    font-weight: 500;
    display: block;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.ck3-account-button:hover span {
    color: #d4c5f9;
}

/* Danger button variant - красная опасная кнопка */
.ck3-account-button.ck3-danger {
    background: linear-gradient(135deg, #2a1a1a 0%, #1a0f0f 100%);
    border-color: #8b2e2e;
}

.ck3-account-button.ck3-danger::before {
    background: radial-gradient(
        circle at top,
        rgba(244, 67, 54, 0.15) 0%,
        transparent 70%
    );
}

.ck3-account-button.ck3-danger:hover {
    background: linear-gradient(135deg, #3a1f1f 0%, #2a1414 100%);
    border-color: #d32f2f;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(211, 47, 47, 0.3);
}

.ck3-account-button.ck3-danger i {
    color: #f44336;
    text-shadow: 0 0 20px rgba(244, 67, 54, 0.3);
}

.ck3-account-button.ck3-danger:hover i {
    color: #ff5252;
    text-shadow: 
        0 0 25px rgba(255, 82, 82, 0.6),
        0 0 35px rgba(244, 67, 54, 0.4);
}

.ck3-account-button.ck3-danger:hover span {
    color: #ff8a80;
}

/* Active/Click state */
.ck3-account-button:active {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(184, 169, 230, 0.15);
}

.ck3-account-button.ck3-danger:active {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(211, 47, 47, 0.2);
}

/* Ripple effect on click */
@keyframes buttonRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.ck3-account-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(184, 169, 230, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ck3-account-button:active::after {
    animation: buttonRipple 0.6s ease-out;
}

.ck3-account-button.ck3-danger::after {
    background: rgba(244, 67, 54, 0.3);
}

/* Responsive для Account Settings */
@media (max-width: 768px) {
    .ck3-account-buttons-grid {
        grid-template-columns: 3fr;
    }
    
    .ck3-account-settings {
        padding: 20px 15px;
    }
    
    .ck3-account-settings h2 {
        font-size: 2em;
    }
}
/* Account Modal Styles */
.ck3-account-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1F1B27;
    border: 1px solid #262230;
    border-radius: 8px;
    padding: 30px;
    width: 450px;
    max-width: 90%;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ck3-account-modal.active {
    display: block;
}

.ck3-account-modal h3 {
    margin-top: 0;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    margin-bottom: 20px;
}

.ck3-account-modal .close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #FFFFFF;
    background: none;
    border: none;
    padding: 0;
}

.ck3-account-modal .close-modal:hover {
    color: #b8a9e6;
}

.ck3-form-group {
    margin-bottom: 20px;
}

.ck3-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
}

.ck3-form-group input {
    width: 100%;
    padding: 12px;
    background-color: #262230;
    border: 1px solid #3a3547;
    border-radius: 4px;
    box-sizing: border-box;
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
}

.ck3-form-group input:focus {
    outline: none;
    border-color: #b8a9e6;
}

.ck3-form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
}

.ck3-btn-primary {
    width: 100%;
    padding: 12px 24px;
    background-color: #262230;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JejuMyeongjo', serif;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.ck3-btn-primary:hover {
    background-color: #3a3547;
}

.ck3-btn-danger {
    width: 100%;
    padding: 12px 24px;
    background-color: #d32f2f;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JejuMyeongjo', serif;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.ck3-btn-danger:hover {
    background-color: #c62828;
}

.ck3-warning-message {
    background-color: #3a2a1a;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ck3-warning-message i {
    color: #ff9800;
    font-size: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.ck3-warning-message p {
    color: #FFFFFF;
    margin: 5px 0;
}

.ck3-warning-message p strong {
    color: #ff9800;
}

/* Responsive */
@media (max-width: 768px) {
    .ck3-heraldry-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .ck3-auth-popup {
        width: 90%;
        max-width: 350px;
    }
    
    .ck3-submit-modal {
        width: 90%;
    }
    
    .ck3-account-modal {
        width: 90%;
    }
    
    .ck3-account-buttons-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FAVOURITES PAGE STYLES
   Add to assets/css/frontend.css
   ============================================ */

/* Favourites Container */
.ck3-favourites-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ck3-favourites-header {
    text-align: center;
    margin-bottom: 40px;
}

.ck3-favourites-header h2 {
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.ck3-favourites-subtitle {
    color: #999;
    font-size: 1.1em;
}

/* Favourites Grid */
.ck3-favourites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    justify-items: center;
}

/* Individual Favourite Item */
.ck3-favourite-item {
    background-color: #1F1B27;
    border: 1px solid #262230;
    border-radius: 12px;
    padding: 15px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 220px;
}

.ck3-favourite-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: #3a3547;
}

/* Remove Button */
.ck3-remove-favourite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background-color: rgba(211, 47, 47, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* ============================================
   REMOVE FAVOURITE BUTTON IN FAVOURITES
   ============================================ */

.ck3-remove-favourite-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; /* Всегда видна */
    padding: 0;
    border-radius: 0;
    outline: none !important;
    box-shadow: none !important;
}

.ck3-remove-favourite-btn img {
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px #ff5252) 
            drop-shadow(0 0 12px #ff1744)
            drop-shadow(0 0 16px #d50000);
}

/* Hover state - усиленное красное свечение */
.ck3-remove-favourite-btn:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ck3-remove-favourite-btn:hover img {
    filter: drop-shadow(0 0 12px #ff7979) 
            drop-shadow(0 0 18px #ff5252)
            drop-shadow(0 0 24px #ff1744);
    transform: scale(1.15);
}

/* Active/focus states - прозрачный фон */
.ck3-remove-favourite-btn:active,
.ck3-remove-favourite-btn:focus,
.ck3-remove-favourite-btn:focus-visible {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Animation when removing */
@keyframes removePulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px #ff5252) 
                drop-shadow(0 0 12px #ff1744);
    }
    25% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 15px #ff5252) 
                drop-shadow(0 0 20px #ff1744)
                drop-shadow(0 0 25px #d50000);
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px #ff5252) 
                drop-shadow(0 0 25px #ff1744)
                drop-shadow(0 0 30px #d50000);
    }
    75% {
        transform: scale(1.25);
        filter: drop-shadow(0 0 15px #ff5252) 
                drop-shadow(0 0 20px #ff1744)
                drop-shadow(0 0 25px #d50000);
    }
}

.ck3-remove-favourite-btn.animating img {
    animation: removePulse 0.6s ease-in-out;
}

/* Ripple effect on click - красный */
.ck3-remove-favourite-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 82, 82, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.ck3-remove-favourite-btn.animating::before {
    width: 60px;
    height: 60px;
    opacity: 1;
}

/* Click animation for removal */
@keyframes removeClick {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px #ff5252) 
                drop-shadow(0 0 12px #ff1744);
    }
    50% {
        transform: scale(1.4);
        filter: drop-shadow(0 0 20px #ff5252) 
                drop-shadow(0 0 30px #ff1744)
                drop-shadow(0 0 40px #d50000);
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px #ff5252) 
                drop-shadow(0 0 12px #ff1744)
                drop-shadow(0 0 16px #d50000);
    }
}

.ck3-remove-favourite-btn.removing img {
    animation: removeClick 0.8s ease-out;
}

/* Responsive for remove button */
@media (max-width: 768px) {
    .ck3-remove-favourite-btn {
        width: 40px;
        height: 40px;
        opacity: 1;
        background: transparent !important;
        border: none !important;
    }
    
    .ck3-remove-favourite-btn img {
        width: 40px;
        height: 40px;
    }
}

/* Favourite Image */
.ck3-favourite-image {
    width: 100%;
    cursor: pointer;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.ck3-favourite-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ck3-favourite-image:hover img {
    transform: scale(1.05);
}

/* Favourite Info */
.ck3-favourite-info {
    text-align: center;
}

.ck3-favourite-title {
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    font-size: 1.1em;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.ck3-favourite-stats,
.ck3-favourite-date {
    color: #999;
    font-size: 0.85em;
    margin: 5px 0;
}

.ck3-favourite-stats i,
.ck3-favourite-date i {
    margin-right: 5px;
    color: #b8a9e6;
}

/* Empty State */
.ck3-favourites-empty {
    text-align: center;
    padding: 80px 20px;
}

.ck3-empty-icon {
    font-size: 80px;
    color: #3a3547;
    margin-bottom: 20px;
}

.ck3-favourites-empty h3 {
    color: #FFFFFF;
    font-family: 'JejuMyeongjo', serif;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.ck3-favourites-empty p {
    color: #999;
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ck3-browse-catalog-btn {
    display: inline-block;
    padding: 15px 35px;
    background-color: #262230;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'JejuMyeongjo', serif;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.ck3-browse-catalog-btn:hover {
    background-color: #3a3547;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FAVOURITE TOGGLE BUTTON IN CATALOG
   ============================================ */

.ck3-favourite-toggle {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    padding: 0;
    border-radius: 0;
    outline: none !important;
    box-shadow: none !important;
}

.ck3-heraldry-item:hover .ck3-favourite-toggle {
    opacity: 1;
}

.ck3-favourite-toggle img {
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 0 transparent);
}

/* Hover state - yellow glow - ПРОЗРАЧНЫЙ ФОН */
.ck3-favourite-toggle:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ck3-favourite-toggle:hover img {
    filter: drop-shadow(0 0 8px #ffeb3b) 
            drop-shadow(0 0 12px #ffc107)
            drop-shadow(0 0 16px #ff9800);
    transform: scale(1.1);
}

/* Active/Favourited State - green glow - ПРОЗРАЧНЫЙ ФОН */
.ck3-favourite-toggle[data-is-favourite="1"] {
    opacity: 1;
    background: transparent !important;
    border: none !important;
}

.ck3-favourite-toggle[data-is-favourite="1"] img {
    filter: drop-shadow(0 0 8px #4caf50) 
            drop-shadow(0 0 12px #2e7d32)
            drop-shadow(0 0 16px #1b5e20);
}

/* Hover effect for favourited items - ПРОЗРАЧНЫЙ ФОН */
.ck3-favourite-toggle[data-is-favourite="1"]:hover {
    background: transparent !important;
    border: none !important;
}

.ck3-favourite-toggle[data-is-favourite="1"]:hover img {
    filter: drop-shadow(0 0 10px #8bc34a) 
            drop-shadow(0 0 15px #4caf50)
            drop-shadow(0 0 20px #2e7d32);
    transform: scale(1.15);
}

/* Active/focus states - ПРОЗРАЧНЫЙ ФОН */
.ck3-favourite-toggle:active,
.ck3-favourite-toggle:focus,
.ck3-favourite-toggle:focus-visible {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Animation when toggling favourite */
@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 transparent);
    }
    25% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 15px #4caf50) 
                drop-shadow(0 0 20px #2e7d32);
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px #4caf50) 
                drop-shadow(0 0 25px #2e7d32);
    }
    75% {
        transform: scale(1.25);
        filter: drop-shadow(0 0 15px #4caf50) 
                drop-shadow(0 0 20px #2e7d32);
    }
}

.ck3-favourite-toggle.animating img {
    animation: starPulse 0.6s ease-in-out;
}

/* Ripple effect on click - positioned around the star */
.ck3-favourite-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.ck3-favourite-toggle.animating::before {
    width: 60px;
    height: 60px;
    opacity: 1;
}

/* Click animation for adding to favourites */
@keyframes favouriteAdd {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        transform: scale(1.4);
        filter: drop-shadow(0 0 20px #4caf50) 
                drop-shadow(0 0 30px #2e7d32);
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px #4caf50) 
                drop-shadow(0 0 12px #2e7d32);
    }
}

.ck3-favourite-toggle.adding-favourite img {
    animation: favouriteAdd 0.8s ease-out;
}

/* Remove animation for removing from favourites */
@keyframes favouriteRemove {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px #4caf50);
    }
    50% {
        transform: scale(0.7);
        filter: drop-shadow(0 0 0 transparent);
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 transparent);
    }
}

.ck3-favourite-toggle.removing-favourite img {
    animation: favouriteRemove 0.6s ease-in;
}

.ck3-favourite-item.removing {
    animation: fadeOutScale 0.4s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .ck3-favourites-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .ck3-favourite-toggle {
        width: 40px;
        height: 40px;
        opacity: 1;
        background: transparent !important;
        border: none !important;
    }
    
    .ck3-favourite-toggle img {
        font-size: 18px;
    }
    
    .ck3-remove-favourite-btn {
        width: 30px;
        height: 30px;
    }
    
    .ck3-remove-favourite-btn img {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ck3-favourites-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}


/* ============================================
   ACCOUNT SETTINGS - ДОПОЛНИТЕЛЬНЫЕ СТИЛИ
   Добавьте эти стили в конец frontend.css
   ============================================ */

/* Кнопка "Выйти" - отдельный стиль */
.ck3-account-button.ck3-logout {
    background: linear-gradient(135deg, #1a2a2a 0%, #0f1a1a 100%);
    border-color: #2e5b5b;
}

.ck3-account-button.ck3-logout::before {
    background: radial-gradient(
        circle at top,
        rgba(46, 125, 50, 0.15) 0%,
        transparent 70%
    );
}

.ck3-account-button.ck3-logout:hover {
    background: linear-gradient(135deg, #1f3535 0%, #142424 100%);
    border-color: #2e7d32;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(46, 125, 50, 0.3);
}

.ck3-account-button.ck3-logout i {
    color: #4caf50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.ck3-account-button.ck3-logout:hover i {
    color: #66bb6a;
    text-shadow: 
        0 0 25px rgba(102, 187, 106, 0.6),
        0 0 35px rgba(76, 175, 80, 0.4);
}

.ck3-account-button.ck3-logout:hover span {
    color: #81c784;
}

.ck3-account-button.ck3-logout::after {
    background: rgba(76, 175, 80, 0.3);
}

/* Модальные окна - улучшенный вид */
.ck3-modal-info {
    background-color: rgba(184, 169, 230, 0.1);
    border-left: 3px solid #b8a9e6;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ck3-modal-info i {
    color: #b8a9e6;
    margin-right: 8px;
}

.ck3-modal-info p {
    color: #FFFFFF;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Улучшенные инпуты в модальных окнах */
.ck3-form-group input:focus {
    outline: none;
    border-color: #b8a9e6;
    box-shadow: 0 0 0 2px rgba(184, 169, 230, 0.2);
}

/* Анимация открытия модальных окон */
.ck3-account-modal {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ck3-account-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Стили для маленьких подсказок */
.ck3-form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

/* Улучшенные кнопки действий */
.ck3-btn-primary,
.ck3-btn-danger {
    position: relative;
    overflow: hidden;
}

.ck3-btn-primary::before,
.ck3-btn-danger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.ck3-btn-primary:hover::before,
.ck3-btn-danger:hover::before {
    width: 300px;
    height: 300px;
}

/* Disabled state для кнопок */
.ck3-btn-primary:disabled,
.ck3-btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Индикатор загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ck3-btn-primary.loading::after,
.ck3-btn-danger.loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Responsive для кнопок */
@media (max-width: 768px) {
    .ck3-account-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ck3-account-button {
        padding: 25px 15px;
    }
    
    .ck3-account-button i {
        font-size: 42px;
        margin-bottom: 12px;
    }
    
    .ck3-account-button span {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .ck3-account-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .ck3-account-modal {
        width: 95%;
        padding: 20px;
    }
    
    .ck3-account-modal h3 {
        font-size: 1.3em;
    }
}

/* Улучшенная анимация для overlay */
.ck3-popup-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ck3-popup-overlay.active {
    opacity: 1;
}

/* Плавное появление toast уведомлений */
@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ck3-toast {
    animation: toastSlideIn 0.3s ease-out;
}

/* Улучшенный warning message */
.ck3-warning-message {
    animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
    0%, 100% {
        border-left-color: #ff9800;
    }
    50% {
        border-left-color: #f57c00;
    }
}