/**
 * TV Streaming Stick Finder - Styles
 * Admin + Frontend Styling
 * Mit erhöhter Spezifität für Theme-Kompatibilität
 */

/* ================================================
   ADMIN STYLES
   ================================================ */

.tvss-tab-content {
    padding: 20px 0;
}

.tvss-product-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #0073aa;
    margin: 15px 0;
    border-radius: 4px;
}

.tvss-product-box.tvss-new-product {
    border-left-color: #00a32a;
}

.tvss-product-header {
    padding: 15px 20px;
    background: #f6f7f7;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tvss-product-number {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.tvss-new-product .tvss-product-number {
    background: #00a32a;
}

.tvss-product-title-preview {
    flex-grow: 1;
}

.tvss-product-badge-preview {
    background: #ddd;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #555;
}

.tvss-product-badge-preview:empty {
    display: none;
}

.tvss-product-details {
    padding: 20px;
    border-top: 1px solid #ddd;
}

.tvss-scoring-table th,
.tvss-scoring-table td {
    text-align: center;
    padding: 8px 5px;
}

.tvss-scoring-table input {
    text-align: center;
}

.button-link-delete {
    color: #b32d2e !important;
}

/* ================================================
   FRONTEND STYLES - Mit erhöhter Spezifität
   ================================================ */

#tvss-finder.tvss-finder-wrapper {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#tvss-finder .tvss-quiz-container {
    background: linear-gradient(135deg, #1a2a3a 0%, #0d4f6e 50%, #1a5276 100%) !important;
    border-radius: 20px;
    padding: 50px 40px;
    color: #fff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#tvss-finder .tvss-quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#tvss-finder .tvss-quiz-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
}

#tvss-finder .tvss-quiz-icon {
    margin-bottom: 15px;
}

#tvss-finder .tvss-icon-pulse {
    display: inline-block;
    font-size: 3em;
    animation: tvssPulse 2s ease-in-out infinite;
}

@keyframes tvssPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#tvss-finder .tvss-quiz-title {
    font-size: 1.8em !important;
    font-weight: 700 !important;
    margin: 0 0 10px !important;
    color: #ffffff !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

#tvss-finder .tvss-quiz-subtitle {
    font-size: 1.1em !important;
    opacity: 0.9;
    margin: 0 !important;
    max-width: 600px;
    margin-left: auto !important;
    margin-right: auto !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Progress Bar */
#tvss-finder .tvss-progress-wrapper {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
}

#tvss-finder .tvss-progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.15) !important;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#tvss-finder .tvss-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39) !important;
    border-radius: 5px;
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

#tvss-finder .tvss-progress-text {
    font-size: 0.95em !important;
    opacity: 0.8;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Questions */
#tvss-finder .tvss-question {
    display: none;
    animation: tvssFadeSlideIn 0.5s ease;
    position: relative;
    z-index: 1;
}

#tvss-finder .tvss-question.active {
    display: block;
}

@keyframes tvssFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#tvss-finder .tvss-question-title {
    text-align: center;
    font-size: 1.5em !important;
    margin: 0 0 15px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

#tvss-finder .tvss-click-hint {
    text-align: center;
    margin: 0 0 25px !important;
    font-size: 0.95em !important;
    color: rgba(255,255,255,0.7) !important;
    animation: tvssHintBounce 1.5s ease-in-out infinite;
}

#tvss-finder .tvss-hint-icon {
    display: inline-block;
    animation: tvssPointerBounce 1s ease-in-out infinite;
}

@keyframes tvssHintBounce {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes tvssPointerBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Answers */
#tvss-finder .tvss-answers {
    display: grid;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

#tvss-finder .tvss-answers[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

#tvss-finder .tvss-answers[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

#tvss-finder .tvss-answer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    background: rgba(255,255,255,0.08) !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    border-radius: 16px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    color: #fff !important;
    position: relative;
    overflow: hidden;
}

#tvss-finder .tvss-answer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

#tvss-finder .tvss-answer:hover::before {
    left: 100%;
}

#tvss-finder .tvss-answer:hover {
    background: rgba(76, 175, 80, 0.2) !important;
    border-color: #4CAF50 !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3), 0 0 0 1px rgba(76, 175, 80, 0.5);
}

#tvss-finder .tvss-answer:active {
    transform: translateY(-2px) scale(0.98);
}

#tvss-finder .tvss-answer.selected {
    background: rgba(76, 175, 80, 0.3) !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4), inset 0 0 20px rgba(76, 175, 80, 0.1);
}

#tvss-finder .tvss-answer.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #4CAF50 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff !important;
    animation: tvssCheckPop 0.3s ease;
}

@keyframes tvssCheckPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

#tvss-finder .tvss-answer-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

#tvss-finder .tvss-answer:hover .tvss-answer-icon {
    transform: scale(1.15);
}

#tvss-finder .tvss-answer-text {
    font-weight: 600 !important;
    font-size: 1.1em !important;
    margin-bottom: 5px;
    color: #ffffff !important;
}

#tvss-finder .tvss-answer-detail {
    font-size: 0.85em !important;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Result */
#tvss-finder #tvss-result {
    display: none;
    animation: tvssFadeSlideIn 0.6s ease;
    position: relative;
    z-index: 1;
}

#tvss-finder .tvss-result-header {
    text-align: center;
    margin-bottom: 25px;
}

#tvss-finder .tvss-result-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
    animation: tvssCelebrate 0.6s ease;
}

@keyframes tvssCelebrate {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

#tvss-finder .tvss-result-title {
    font-size: 1.4em !important;
    margin: 0 !important;
    color: #ffffff !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* Product Result Card */
#tvss-finder .tvss-product-result {
    background: rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    border: 2px solid rgba(76, 175, 80, 0.5) !important;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

#tvss-finder .tvss-product-badge {
    display: inline-block;
    background: linear-gradient(90deg, #4CAF50, #8BC34A) !important;
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85em !important;
    font-weight: 600 !important;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#tvss-finder .tvss-product-image {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin: 15px auto;
    border-radius: 10px;
    display: block;
    background: rgba(255,255,255,0.1);
    min-height: 50px;
}

/* Bild ausblenden wenn src leer */
#tvss-finder .tvss-product-image[src=""],
#tvss-finder .tvss-product-image:not([src]) {
    display: none !important;
}

#tvss-finder .tvss-product-name {
    font-size: 1.6em !important;
    font-weight: 700 !important;
    margin: 15px 0 10px !important;
    color: #ffffff !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

#tvss-finder .tvss-product-price {
    font-size: 1.4em !important;
    color: #8BC34A !important;
    font-weight: 700 !important;
    margin-bottom: 15px;
}

#tvss-finder .tvss-product-description {
    opacity: 0.9;
    margin-bottom: 25px !important;
    line-height: 1.6 !important;
    font-size: 1em !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

#tvss-finder .tvss-product-cta {
    display: inline-block;
    background: linear-gradient(90deg, #4CAF50, #45a049) !important;
    color: #fff !important;
    padding: 16px 45px;
    border-radius: 10px;
    font-weight: 600 !important;
    font-size: 1.1em !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#tvss-finder .tvss-product-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    color: #fff !important;
    text-decoration: none !important;
}

#tvss-finder .tvss-result-actions {
    text-align: center;
    margin-top: 30px;
}

#tvss-finder .tvss-restart-btn {
    background: transparent !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em !important;
    transition: all 0.3s ease;
}

#tvss-finder .tvss-restart-btn:hover {
    border-color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}

/* Responsive */
@media (max-width: 768px) {
    #tvss-finder .tvss-quiz-container {
        padding: 35px 20px;
        border-radius: 15px;
    }
    
    #tvss-finder .tvss-quiz-title {
        font-size: 1.4em !important;
    }
    
    #tvss-finder .tvss-question-title {
        font-size: 1.2em !important;
    }
    
    #tvss-finder .tvss-answers[data-columns="3"],
    #tvss-finder .tvss-answers[data-columns="2"] {
        grid-template-columns: 1fr;
    }
    
    #tvss-finder .tvss-answer {
        padding: 20px 15px;
    }
    
    #tvss-finder .tvss-answer-icon {
        font-size: 2em;
    }
    
    #tvss-finder .tvss-product-result {
        padding: 25px 20px;
    }
    
    #tvss-finder .tvss-product-name {
        font-size: 1.3em !important;
    }
}