/* Professional WordPress Superpower Generator Styles */
.rsg-card {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.1);
    border: 2px solid rgba(30, 58, 138, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow: hidden;
}

.rsg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #60a5fa);
}

/* Header Styles */
.rsg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.rsg-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rsg-badge {
    background: #1e3a8a;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsg-sub {
    margin: 0 0 2rem 0;
    color: #374151;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Controls Section */
.rsg-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.rsg-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rsg-chip {
    padding: 0.6rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.rsg-chip:hover {
    border-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.rsg-chip.rsg-active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.rsg-custom-wrap {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: auto;
}

.rsg-input {
    width: 100px;
    padding: 0.6rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    color: #1f2937;
    transition: border-color 0.3s ease;
}

.rsg-input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.rsg-btn {
    background: #1e3a8a;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rsg-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
}

.rsg-btn:active {
    transform: translateY(0);
}

/* Meta Section */
.rsg-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}

.rsg-session {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 500;
}

.rsg-session-count {
    font-weight: 700;
    color: #1e3a8a;
}

.rsg-actions {
    display: flex;
    gap: 0.5rem;
}

.rsg-small {
    padding: 0.4rem 0.8rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.rsg-small:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
    background: #f8fafc;
}

/* Results Section */
.rsg-results {
    margin-bottom: 2rem;
    background: #fefefe;
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    position: relative;
}

.rsg-counter {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3a8a;
    text-align: center;
}

.rsg-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Individual Power Cards */
.rsg-power-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rsg-power-card.rsg-visible {
    opacity: 1;
    transform: translateY(0);
}

.rsg-power-card:hover {
    border-color: #1e3a8a;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.15);
    transform: translateY(-2px);
}

.rsg-power-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rsg-power-number {
    background: #1e3a8a;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rsg-power-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e3a8a;
    flex: 1;
}

.rsg-power-explanation {
    margin: 0 0 1.5rem 0;
    color: #374151;
    line-height: 1.6;
    font-size: 1rem;
}

.rsg-power-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.rsg-copy-btn,
.rsg-like-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.rsg-copy-btn {
    background: #1e3a8a;
    color: white;
}

.rsg-copy-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.rsg-like-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #d1d5db;
}

.rsg-like-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.rsg-like-btn.rsg-liked {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Footer Section */
.rsg-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(30, 58, 138, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.rsg-footer small {
    color: #6b7280;
    font-size: 0.9rem;
}

.rsg-share {
    display: flex;
    gap: 0.5rem;
}

.rsg-share-btn {
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.rsg-share-btn:hover {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    transform: translateY(-1px);
}

/* Confetti Animation */
.rsg-confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: confettiFall 3s ease-out forwards;
    z-index: 100;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) rotate(720deg);
        opacity: 0;
    }
}

/* FIXED MOBILE RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .rsg-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    /* CENTER ALIGN TITLE ON MOBILE */
    .rsg-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .rsg-title {
        font-size: 1.5rem;
        text-align: center;
        justify-content: center;
        width: 100%;
    }
    
    .rsg-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rsg-custom-wrap {
        margin-left: 0;
        justify-content: center;
        width: 100%;
    }
    
    /* MAKE GENERATE BUTTON FULLY RESPONSIVE */
    .rsg-btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .rsg-list {
        grid-template-columns: 1fr;
    }
    
    .rsg-meta {
        flex-direction: column;
        text-align: center;
    }
    
    .rsg-footer {
        flex-direction: column;
        text-align: center;
    }
    
    /* MAKE SHARE BUTTONS FULLY RESPONSIVE */
    .rsg-share {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .rsg-share-btn {
        flex: 1;
        text-align: center;
        min-width: 0;
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .rsg-power-actions {
        flex-direction: column;
    }
    
    .rsg-copy-btn,
    .rsg-like-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1rem;
    }
}

@media (max-width: 480px) {
    .rsg-presets {
        justify-content: center;
        width: 100%;
    }
    
    .rsg-chip {
        flex: 1;
        min-width: 0;
        padding: 0.7rem 0.5rem;
    }
    
    .rsg-power-card {
        padding: 1rem;
    }
    
    .rsg-power-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* EXTRA RESPONSIVE FOR SHARE BUTTONS */
    .rsg-share-btn {
        font-size: 0.8rem;
        padding: 0.7rem 0.3rem;
        min-height: 44px;
    }
    
    .rsg-custom-wrap {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }
    
    .rsg-input {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

/* Loading States */
.rsg-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.rsg-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Accessibility Improvements */
.rsg-card *:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

.rsg-card button:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .rsg-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .rsg-controls,
    .rsg-actions,
    .rsg-share,
    .rsg-power-actions {
        display: none;
    }
}