:root {
    --primary-color: #2563eb; /* Elegant Blue */
    --primary-light: #dbeafe;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --danger: #ef4444;

    font-family: 'Cairo', sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs for elegant modern look */
.background-decor {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px; height: 400px;
    background: #93c5fd;
    top: -100px; right: -100px;
}

.blob-2 {
    width: 300px; height: 300px;
    background: #c4b5fd;
    bottom: -50px; left: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
    padding: 20px 0;
}

/* Glassmorphism Card */
.ticket-card, .shop-header, .error-state, .loading-state, .rating-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ticket-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
}

/* Header */
.shop-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    animation: slideDown 0.6s ease-out;
}

.shop-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.shop-details h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.loading-state, .error-state, .ticket-card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading */
.loading-state {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error */
.error-state {
    text-align: center;
    color: var(--danger);
}
.error-icon {
    margin-bottom: 16px;
}

/* Ticket Info */
.status-badge-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    background: rgba(0,0,0,0.05);
    animation: statusGlow 2s infinite alternate;
}

@keyframes statusGlow {
    0% {
        box-shadow: 0 0 2px var(--status-glow-color, rgba(0,0,0,0.1));
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 12px var(--status-glow-color, rgba(0,0,0,0.25));
        transform: scale(1.02);
    }
}

.status-dot {
    display: none; /* Removing dot since we are animating the whole badge */
}

.device-title {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 16px;
}

.device-title h2 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.ticket-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.highlight-value {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.footer-note {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Social Media Inline Buttons */
.whatsapp-inline-btn, .facebook-inline-btn, .instagram-inline-btn, .website-inline-btn {
    color: white;
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-inline-btn {
    background-color: #25D366;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}
.whatsapp-inline-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
    color: white;
}

.facebook-inline-btn {
    background-color: #1877F2;
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}
.facebook-inline-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(24, 119, 242, 0.5);
    color: white;
}

.instagram-inline-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 10px rgba(225, 48, 108, 0.3);
}
.instagram-inline-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(225, 48, 108, 0.5);
    color: white;
}

.website-inline-btn {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.website-inline-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.5);
    color: white;
}

.whatsapp-inline-btn svg, .facebook-inline-btn svg, .instagram-inline-btn svg, .website-inline-btn svg {
    width: 18px;
    height: 18px;
}

/* Horizontal Interactive Timeline */
.timeline-container {
    width: 100%;
    margin: 30px 0;
    padding: 0 10px;
    box-sizing: border-box;
}
.timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* align top to allow multiline content */
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 15px; /* middle of circle */
    left: 0;
    right: 0;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
    border-radius: 2px;
}
.timeline-progress {
    position: absolute;
    top: 15px;
    right: 0; /* RTL starts from right */
    height: 4px;
    background: var(--status-glow-color, var(--primary-color));
    z-index: 2;
    transition: width 0.8s ease-in-out, background 0.5s ease;
    border-radius: 2px;
}
.step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 25%;
}
.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-weight: bold;
    font-size: 0.9rem;
    border: 3px solid var(--card-bg);
    transition: all 0.5s ease;
    flex-shrink: 0;
}
.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.5s ease;
}
.step-time {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.2;
}

/* Step States */
.step.active .step-circle {
    background: var(--status-glow-color, var(--primary-color));
    color: white;
    box-shadow: 0 0 10px var(--status-glow-color, rgba(0,0,0,0.2));
    transform: scale(1.1);
}
.step.active .step-label {
    color: var(--text-main);
}
.step.completed .step-circle {
    background: var(--status-glow-color, var(--success));
    color: white;
}
.step.completed .step-label {
    color: var(--text-main);
}
.step.error .step-circle {
    background: var(--danger) !important;
    color: white;
}

/* Rating Card specific styles */
.rating-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.6s ease-out;
}

.stars-container {
    display: flex;
    flex-direction: row-reverse; /* RTL for correct hover direction if needed, but normally flex-direction row works */
    gap: 8px;
    justify-content: center;
}

.stars-container .star {
    font-size: 2.5rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.stars-container .star:hover,
.stars-container .star:hover ~ .star,
.stars-container.hovered .star.hovered {
    color: #f59e0b;
    transform: scale(1.1);
}

.stars-container .star.active {
    color: #f59e0b;
}

#complaintText {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #d0d7de;
    border-radius: 12px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

#complaintText:focus {
    border-color: var(--primary-color, #1a73e8);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.btn-submit-complaint {
    background: #e53935;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
    margin-top: 10px;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
}

.btn-submit-complaint:hover {
    background: #c62828;
}

.btn-submit-complaint:active {
    transform: scale(0.98);
}

.high-rating-thankyou {
    font-size: 0.95rem;
    font-weight: 700;
    color: #16a34a;
    margin: 4px 0 14px 0;
    line-height: 1.5;
}

.btn-submit-high {
    background: #1a73e8;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.3);
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-submit-high:hover {
    background: #1557b0;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.4);
}

.btn-submit-high:active {
    transform: scale(0.98);
}
