/**
 * Frontend Styles - Customer Rank Checker
 * Modern & Beautiful Design - Responsive for Mobile, Tablet, Desktop
 */

/* Reset and Base Styles */
.crc-checker-container {
    max-width: 650px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Noto Sans Thai', 'Poppins', sans-serif;
    position: relative;
}

/* Animated Background */
.crc-checker-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, 
        rgba(255, 192, 203, 0.1) 0%, 
        rgba(255, 182, 193, 0.1) 25%,
        rgba(255, 160, 180, 0.1) 50%,
        rgba(255, 192, 203, 0.1) 75%,
        rgba(255, 182, 193, 0.1) 100%);
    background-size: 400% 400%;
    animation: crc-gradientShift 15s ease infinite;
    z-index: -1;
    border-radius: 50%;
    opacity: 0.5;
}

@keyframes crc-gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.crc-checker-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(255, 192, 203, 0.2);
    padding: 40px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    animation: crc-cardSlideIn 0.6s ease-out;
}

.crc-checker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #FFC0CB 0%, 
        #FFB6C1 25%,
        #FFA0B4 50%,
        #FFB6C1 75%,
        #FFC0CB 100%);
    background-size: 200% 100%;
    animation: crc-shimmer 3s linear infinite;
}

@keyframes crc-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes crc-cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.crc-checker-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B9D 0%, #FFC0CB 50%, #FFB6C1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 32px 0;
    text-align: center;
    position: relative;
    padding-bottom: 16px;
}

.crc-checker-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFC0CB, transparent);
    border-radius: 2px;
}

/* Form Styles */
.crc-check-form {
    margin-bottom: 20px;
}

.crc-form-group {
    margin-bottom: 24px;
    position: relative;
}

.crc-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
}

.crc-label::before {
    content: '📱';
    font-size: 18px;
}

.crc-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
    font-weight: 500;
    letter-spacing: 1px;
}

.crc-input:focus {
    outline: none;
    border-color: #FFC0CB;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 192, 203, 0.1);
    transform: translateY(-2px);
}

.crc-input::placeholder {
    color: #bbb;
    font-weight: 400;
}

.crc-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}

.crc-hint::before {
    content: '💡';
    font-size: 14px;
}

/* Button Styles */
.crc-button {
    width: 100%;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #FF6B9D 0%, #FFC0CB 50%, #FFB6C1 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(255, 107, 157, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.crc-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.crc-button:hover::before {
    width: 300px;
    height: 300px;
}

.crc-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.15);
    background-position: 100% 0;
}

.crc-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 15px rgba(255, 107, 157, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.crc-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    background-position: 0 0;
}

.crc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: crc-spin 0.8s linear infinite;
}

@keyframes crc-spin {
    to { transform: rotate(360deg); }
}

/* Result Container */
.crc-result-container {
    margin-top: 32px;
    padding: 32px;
    background: linear-gradient(135deg, 
        rgba(255, 192, 203, 0.1) 0%, 
        rgba(255, 182, 193, 0.15) 100%);
    border-radius: 20px;
    border: 2px solid rgba(255, 192, 203, 0.3);
    animation: crc-resultSlideIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.crc-result-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 192, 203, 0.1) 0%, transparent 70%);
    animation: crc-pulse 3s ease-in-out infinite;
}

@keyframes crc-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes crc-resultSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.crc-result-success {
    text-align: center;
    position: relative;
    z-index: 1;
}

.crc-rank-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    margin: 24px auto;
    display: block;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(255, 192, 203, 0.3);
    animation: crc-imagePop 0.6s ease-out 0.2s both;
    border: 3px solid rgba(255, 255, 255, 0.8);
    background: #fff;
    padding: 8px;
}

@keyframes crc-imagePop {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.crc-rank-name {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B9D 0%, #FFC0CB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 24px 0 16px 0;
    position: relative;
    display: inline-block;
    padding: 0 20px;
}

.crc-rank-name::before,
.crc-rank-name::after {
    content: '✨';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    animation: crc-sparkle 2s ease-in-out infinite;
}

.crc-rank-name::before {
    left: -10px;
    animation-delay: 0s;
}

.crc-rank-name::after {
    right: -10px;
    animation-delay: 1s;
}

@keyframes crc-sparkle {
    0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

.crc-rank-info {
    font-size: 16px;
    color: #555;
    margin: 12px 0;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 192, 203, 0.2);
    font-weight: 500;
}

.crc-result-error {
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 14px;
    color: #856404;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    position: relative;
    z-index: 1;
}

.crc-result-error::before {
    content: '⚠️';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

.crc-result-warning {
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 14px;
    color: #856404;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    position: relative;
    z-index: 1;
}

.crc-result-warning::before {
    content: '🔒';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crc-checker-container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .crc-checker-card {
        padding: 28px;
        border-radius: 20px;
    }
    
    .crc-checker-title {
        font-size: 26px;
    }
    
    .crc-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 18px;
    }
    
    .crc-button {
        padding: 16px 28px;
        font-size: 17px;
    }
    
    .crc-rank-image {
        max-width: 240px;
    }
    
    .crc-rank-name {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .crc-checker-container {
        padding: 10px;
        margin: 15px auto;
    }
    
    .crc-checker-card {
        padding: 24px;
        border-radius: 18px;
    }
    
    .crc-checker-title {
        font-size: 22px;
        margin-bottom: 24px;
    }
    
    .crc-input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .crc-button {
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .crc-result-container {
        padding: 24px;
        border-radius: 16px;
    }
    
    .crc-rank-image {
        max-width: 200px;
        margin: 20px auto;
    }
    
    .crc-rank-name {
        font-size: 24px;
        padding: 0 15px;
    }
    
    .crc-rank-info {
        font-size: 14px;
        padding: 10px 16px;
    }
}

