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

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #181e25;
    min-height: 100vh;
    padding: 10px;
    color: #ffffff;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(226, 16, 46, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(226, 16, 46, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
}

.logo-container {
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    height: 50px;
    width: auto;
    filter: brightness(1.1);
}

header {
    position: relative;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
}

.admin-link {
    background: rgba(226, 16, 46, 0.15);
    border: 1px solid rgba(226, 16, 46, 0.4);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.admin-link:hover {
    background: rgba(226, 16, 46, 0.25);
    border-color: #e2102e;
}

.role-badge-header {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge-header.role-admin { background: rgba(226,16,46,0.2); color: #ff4d6a; border: 1px solid rgba(226,16,46,0.4); }
.role-badge-header.role-operator { background: rgba(255,165,0,0.2); color: #ffa500; border: 1px solid rgba(255,165,0,0.4); }
.role-badge-header.role-team { background: rgba(0,150,255,0.2); color: #4da6ff; border: 1px solid rgba(0,150,255,0.3); }
.role-badge-header.role-partner { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.2); }

.logout-btn {
    background: rgba(226, 16, 46, 0.2);
    border: 1px solid rgba(226, 16, 46, 0.5);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(226, 16, 46, 0.3);
    border-color: #e2102e;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e2102e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.tool-navigation {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.8s ease 0.5s both;
}

.nav-tab {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-tab svg {
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(226, 16, 46, 0.4);
}

.nav-tab.active svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.tool-container {
    animation: fadeIn 0.5s ease;
}

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

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

.upload-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease 0.6s both;
}

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

.analyzer-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.analyzer-header {
    text-align: center;
    margin-bottom: 35px;
}

.analyzer-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.analyzer-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.article-input-area {
    margin-bottom: 25px;
}

.article-input-area label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.article-input-area textarea {
    width: 100%;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    line-height: 1.6;
    min-height: 300px;
}

.article-input-area textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.article-input-area textarea:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.1);
}

.article-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.analyze-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(226, 16, 46, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(226, 16, 46, 0.6);
}

.analyze-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.3);
}

.ideas-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.ideas-section h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
}

.ideas-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 35px;
    font-size: 1rem;
}

.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.idea-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.idea-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e2102e, #ff1a3a);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.idea-card:hover::before {
    transform: scaleX(1);
}

.idea-card:hover {
    border-color: rgba(226, 16, 46, 0.5);
    background: rgba(226, 16, 46, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(226, 16, 46, 0.3);
}

.idea-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e2102e;
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(226, 16, 46, 0.4);
}

.reference-badge,
.direct-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.reference-badge {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.direct-badge {
    background: rgba(16, 172, 132, 0.15);
    color: #10ac84;
    border: 1px solid rgba(16, 172, 132, 0.3);
}

.idea-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.idea-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.idea-reason {
    padding: 12px 15px;
    background: rgba(226, 16, 46, 0.1);
    border-left: 3px solid #e2102e;
    border-radius: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.idea-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.generate-from-idea-btn {
    width: 100%;
    padding: 12px;
    background: rgba(226, 16, 46, 0.2);
    color: #e2102e;
    border: 1px solid rgba(226, 16, 46, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
}

.generate-from-idea-btn:hover:not(:disabled) {
    background: #e2102e;
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(226, 16, 46, 0.4);
}

.generate-from-idea-btn.direct-generate {
    background: rgba(16, 172, 132, 0.2);
    color: #10ac84;
    border-color: rgba(16, 172, 132, 0.3);
}

.generate-from-idea-btn.direct-generate:hover:not(:disabled) {
    background: #10ac84;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 172, 132, 0.4);
}

.generate-from-idea-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ideas-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

.nav-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.nav-tab:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}

.under-construction-badge {
    font-size: 1.2rem;
    margin-left: auto;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.secondary-btn {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.check-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.check-header {
    text-align: center;
    margin-bottom: 35px;
}

.check-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.check-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.customer-select-area {
    margin-bottom: 25px;
}

.customer-select-area label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.customer-select-area select {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 12px;
}

.customer-select-area select option {
    background: #181e25;
    color: #ffffff;
}

.customer-select-area select:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.15);
}

.manage-customers-link {
    background: none;
    border: none;
    color: rgba(226, 16, 46, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.manage-customers-link:hover {
    color: #e2102e;
    gap: 12px;
    text-decoration: underline;
}

.article-check-input-area {
    margin-bottom: 25px;
}

.article-check-input-area label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.article-check-input-area textarea {
    width: 100%;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    line-height: 1.6;
    min-height: 350px;
}

.article-check-input-area textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.article-check-input-area textarea:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.1);
}

.check-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(226, 16, 46, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.check-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(226, 16, 46, 0.6);
}

.check-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.3);
}

.check-results-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.check-results-section h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
}

.results-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 35px;
    font-size: 1rem;
}

.check-summary {
    margin-bottom: 40px;
    padding: 30px;
    border-radius: 16px;
    border: 2px solid;
}

.check-summary.summary-ok {
    background: rgba(16, 172, 132, 0.1);
    border-color: rgba(16, 172, 132, 0.4);
}

.check-summary.summary-warning {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.4);
}

.check-summary.summary-error {
    background: rgba(226, 16, 46, 0.1);
    border-color: rgba(226, 16, 46, 0.4);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.summary-icon {
    font-size: 3rem;
    line-height: 1;
}

.summary-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.summary-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item.ok {
    border-color: rgba(16, 172, 132, 0.3);
}

.stat-item.warning {
    border-color: rgba(255, 165, 0, 0.3);
}

.stat-item.error {
    border-color: rgba(226, 16, 46, 0.3);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paragraphs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.paragraph-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.paragraph-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.paragraph-card.paragraph-ok {
    border-left-color: #10ac84;
}

.paragraph-card.paragraph-warning {
    border-left-color: #ffa500;
}

.paragraph-card.paragraph-error {
    border-left-color: #e2102e;
}

.paragraph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.paragraph-number {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
}

.paragraph-score {
    font-weight: 700;
    font-size: 1rem;
}

.paragraph-preview {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
    font-style: italic;
}

.paragraph-feedback {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.paragraph-suggestion {
    margin-top: 12px;
    padding: 12px 15px;
    background: rgba(226, 16, 46, 0.1);
    border-left: 3px solid #e2102e;
    border-radius: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.check-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Quill Editor Dark Theme */
.ql-toolbar.ql-snow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px 12px 0 0;
    border-bottom: none !important;
}

.ql-container.ql-snow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 0 12px 12px;
    border-top: none !important;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.ql-editor {
    min-height: 350px;
    color: #ffffff;
}

.ql-editor.ql-blank::before {
    color: rgba(255, 255, 255, 0.4);
    font-style: normal;
}

.ql-editor h2 {
    color: #e2102e;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 2px solid rgba(226, 16, 46, 0.3);
    padding-bottom: 0.3em;
}

.ql-editor p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.ql-snow .ql-stroke {
    stroke: rgba(255, 255, 255, 0.7);
}

.ql-snow .ql-fill {
    fill: rgba(255, 255, 255, 0.7);
}

.ql-snow .ql-picker-label {
    color: rgba(255, 255, 255, 0.7);
}

.ql-snow .ql-picker-options {
    background: #1a2029;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ql-snow .ql-picker-item:hover {
    color: #e2102e;
}

.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow button:focus,
.ql-toolbar.ql-snow button.ql-active {
    color: #e2102e;
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button:focus .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
    stroke: #e2102e;
}

.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button:focus .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill {
    fill: #e2102e;
}

.cropper-tool-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.cropper-header {
    text-align: center;
    margin-bottom: 35px;
}

.cropper-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.cropper-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.cropper-upload-area {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 30px;
}

.cropper-upload-area:hover {
    border-color: #e2102e;
    background: rgba(226, 16, 46, 0.05);
}

.cropper-upload-area.dragover {
    border-color: #e2102e;
    background: rgba(226, 16, 46, 0.1);
    transform: scale(1.02);
}

.cropper-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cropper-controls {
    margin-bottom: 30px;
}

.crop-template-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.crop-template-selector .secondary-btn {
    flex-shrink: 0;
}

.crop-template-selector label {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.crop-template-selector select {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.crop-template-selector select option {
    background: #181e25;
    color: #ffffff;
}

.crop-template-selector select:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.15);
}

.crop-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(226, 16, 46, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.crop-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(226, 16, 46, 0.6);
}

.crop-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.3);
}

.cropped-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cropped-results h3 {
    text-align: center;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.cropped-image-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
}

.cropped-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.cropped-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cropped-actions .download-btn {
    flex: 1;
    min-width: 200px;
}

.cropped-actions .secondary-btn {
    flex: 1;
    min-width: 200px;
}

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10ac84 0%, #0e9770 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 172, 132, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.success-message svg {
    flex-shrink: 0;
}

.success-message p {
    margin: 0;
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.upload-area {
    position: relative;
    border: 2px dashed rgba(226, 16, 46, 0.3);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(226, 16, 46, 0.05);
}

.upload-area:hover {
    border-color: rgba(226, 16, 46, 0.6);
    background: rgba(226, 16, 46, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #e2102e;
    background: rgba(226, 16, 46, 0.15);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(226, 16, 46, 0.3);
}

#imageInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder svg {
    color: #e2102e;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 10px rgba(226, 16, 46, 0.3));
}

.upload-placeholder p {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 600;
}

.upload-placeholder span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    object-fit: contain;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    width: 100%;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(226, 16, 46, 0.9);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.preview-item .remove-btn:hover {
    background: #e2102e;
    transform: scale(1.1);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(226, 16, 46, 0.9);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #e2102e;
    transform: scale(1.1);
}

.prompt-section {
    margin-top: 30px;
}

.prompt-section label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.prompt-section textarea {
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.prompt-section textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.prompt-section textarea:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.1);
}

.generate-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(226, 16, 46, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(226, 16, 46, 0.6);
}

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

.generate-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.3);
}

.reset-btn {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.reset-btn:active {
    transform: translateY(0);
}

.reset-btn svg {
    flex-shrink: 0;
}

.loading {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #e2102e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 25px;
    box-shadow: 0 0 20px rgba(226, 16, 46, 0.3);
}

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

.loading p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.result-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.result-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
}

.result-container {
    text-align: center;
    margin-bottom: 20px;
}

.result-container img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.download-btn {
    width: 100%;
    padding: 15px;
    background: #10ac84;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #0e9770;
    transform: translateY(-2px);
}

.error-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 22px;
    background: rgba(226, 16, 46, 0.15);
    border-left: 4px solid #e2102e;
    border-radius: 12px;
}

.error-message svg {
    color: #e2102e;
    flex-shrink: 0;
}

.error-message p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
}

.crop-section {
    margin: 30px 0;
    padding: 35px;
    background: rgba(226, 16, 46, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(226, 16, 46, 0.2);
}

.crop-section h3 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}

.crop-description {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.crop-workflow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.crop-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e2102e;
    color: white;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(226, 16, 46, 0.4);
}

.crop-select-large {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.crop-select-large option {
    background: #181e25;
    color: #ffffff;
}

.crop-select-large:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.15);
}

.crop-action-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crop-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(226, 16, 46, 0.5);
}

.crop-action-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.manage-templates-link {
    background: none;
    border: none;
    color: rgba(226, 16, 46, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.manage-templates-link:hover {
    color: #e2102e;
    gap: 12px;
    text-decoration: underline;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #1a2029;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(226, 16, 46, 0.2);
    color: #e2102e;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.add-template-form {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(226, 16, 46, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(226, 16, 46, 0.2);
}

.add-template-form h3 {
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
}

.add-template-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-template-form input {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.add-template-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.add-template-form input:focus {
    outline: none;
    border-color: #e2102e;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(226, 16, 46, 0.15);
}

.add-template-btn {
    padding: 14px;
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(226, 16, 46, 0.3);
}

.add-template-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 16, 46, 0.5);
}

.templates-list h3 {
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
}

#templatesList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.template-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.template-item:hover {
    border-color: rgba(226, 16, 46, 0.5);
    background: rgba(226, 16, 46, 0.08);
    transform: translateX(5px);
}

.template-info {
    flex: 1;
}

.template-name {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.template-dimensions {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.delete-template-btn {
    background: rgba(226, 16, 46, 0.2);
    color: #e2102e;
    border: 1px solid rgba(226, 16, 46, 0.3);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.delete-template-btn:hover {
    background: #e2102e;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(226, 16, 46, 0.4);
}

.modal-large {
    max-width: 1000px;
}

.cropper-info {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.selected-format {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(226, 16, 46, 0.1);
    border-radius: 10px;
    margin-bottom: 18px;
    border: 1px solid rgba(226, 16, 46, 0.3);
}

.selected-format svg {
    color: #e2102e;
    flex-shrink: 0;
}

.selected-format span {
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
}

.cropper-info p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
}

.cropper-container-wrapper {
    max-height: 500px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#cropperImage {
    max-width: 100%;
    display: block;
}

.cropper-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cropper-template-select {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cropper-template-select label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.cropper-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cropper-cancel-btn,
.cropper-apply-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.cropper-cancel-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cropper-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cropper-apply-btn {
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(226, 16, 46, 0.4);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cropper-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(226, 16, 46, 0.6);
}

.seo-info {
    background: rgba(226, 16, 46, 0.08);
    padding: 25px;
    border-radius: 16px;
    margin: 25px 0;
    border: 1px solid rgba(226, 16, 46, 0.2);
}

.seo-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #e2102e;
    font-weight: 700;
    font-size: 1rem;
}

.seo-label svg {
    flex-shrink: 0;
}

.seo-filename {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    word-break: break-all;
    font-weight: 500;
}

.download-buttons {
display: flex;
gap: 15px;
margin-top: 30px;
flex-wrap: wrap;
}

.edit-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.history-toggle {
    position: fixed;
    top: 120px;
    right: 20px;
    background: rgba(226, 16, 46, 0.9);
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(226, 16, 46, 0.3);
}

.history-toggle:hover {
    background: #e2102e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(226, 16, 46, 0.4);
}

.history-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #1a2028;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.history-sidebar.open {
    right: 0;
}

.history-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #1a2028;
    z-index: 10;
}

.history-header h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
}

.history-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.history-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.history-list {
    padding: 15px;
}

.history-loading {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(226, 16, 46, 0.5);
    transform: translateX(-4px);
}

.history-item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.history-item-prompt {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.history-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.history-item-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item-btn:hover {
    background: rgba(226, 16, 46, 0.2);
    border-color: rgba(226, 16, 46, 0.5);
}

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.auth-modal.hidden {
    display: none;
}

.auth-modal-content {
    background: #1a2028;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.auth-modal-content h2 {
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8rem;
}

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

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(226, 16, 46, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e2102e 0%, #b00d24 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 16, 46, 0.4);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.auth-switch-btn {
    background: none;
    border: none;
    color: #e2102e;
    font-weight: 600;
    cursor: pointer;
    margin-left: 5px;
    text-decoration: underline;
}

.auth-switch-btn:hover {
    color: #ff1a3a;
}

.download-btn {
flex: 1;
padding: 15px 20px;
border: none;
border-radius: 10px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
transition: all 0.3s ease;
position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.download-webp-btn {
    background: linear-gradient(135deg, #e2102e 0%, #ff1a3a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(226, 16, 46, 0.4);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-webp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(226, 16, 46, 0.6);
}

.download-png-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.download-png-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.format-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .tool-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-tab {
        width: 100%;
    }
    
    .ideas-grid {
        grid-template-columns: 1fr;
    }
    
    .success-message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-header {
        flex-direction: column;
        text-align: center;
    }
    
    .crop-template-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cropped-actions {
        flex-direction: column;
    }
    
    .cropped-actions .download-btn,
    .cropped-actions .secondary-btn {
        min-width: 100%;
    }
    
    .upload-section,
    .result-section,
    .loading,
    .error-section {
        padding: 25px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .crop-workflow {
        grid-template-columns: 1fr;
    }
    
    .crop-section {
        padding: 20px;
    }
    
    .modal-content {
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-large {
        max-width: 95%;
    }
    
    .cropper-container-wrapper {
        max-height: 350px;
    }
    
    .cropper-actions {
        flex-direction: column;
    }
    
    .cropper-reset-btn,
    .cropper-apply-btn {
        width: 100%;
        justify-content: center;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
    }
}
