/*
 * M3U Checker Plugin Styles
 */

/* General container and card styling */
.m3u-checker-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #4a4a4a;
}

.m3u-checker-form-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.m3u-checker-form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.form-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #333;
}

/* Form and input styling */
.m3u-checker-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.m3u-url-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.m3u-url-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.1);
}

.submit-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-button:hover {
    background-color: #005f8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results section styling */
.m3u-checker-results {
    margin-top: 2rem;
    text-align: left;
    min-height: 50px; /* Reserve space to prevent layout shift */
    position: relative;
}

.result-box {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.result-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.result-section p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.error-message {
    padding: 1rem;
    background-color: #ffebeb;
    color: #cc0000;
    border: 1px solid #cc0000;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .m3u-checker-form-card {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .submit-button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}
