/* =============================================
   CLASSIC APPLE AESTHETIC (Aqua Style)
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

body {
    background: #f5f5f7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
}

.apple-card {
    max-width: 720px;
    width: 100%;
    background: #ffffff;
    border-radius: 32px;
    padding: 32px 30px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    position: relative;
}

/* Header */
.apple-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #f8f8fa 0%, #f0f0f2 100%);
    padding: 12px 16px;
    border-radius: 16px 16px 0 0;
    margin: -32px -30px 24px -30px;
    padding-left: 30px;
    padding-right: 30px;
    border-bottom: 1px solid #e5e5ea;
}

.apple-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.apple-logo i { font-size: 28px; color: #1d1d1f; }

.apple-badge {
    background: #ff3b30;
    color: #fff;
    padding: 4px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    animation: pulseBadge 1s infinite;
}
@keyframes pulseBadge {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Device Box */
.device-box {
    background: #fafafc;
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e5e5ea;
}

.device-icon {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ff3b30;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.device-details { flex: 1; }
.device-details .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: #86868b; }
.device-details .name { font-size: 18px; font-weight: 600; color: #1d1d1f; }

.device-status {
    font-size: 13px;
    background: #ffebeb;
    color: #d70015;
    padding: 4px 16px;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ffc5c5;
}

.device-status .pulse-red {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #d70015;
    border-radius: 50%;
    animation: pulseRed 0.8s infinite;
}
@keyframes pulseRed {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

/* THREAT MESSAGE */
.threat-message-box {
    background: #fff0f0;
    border: 2px solid #d70015;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.threat-message-box .text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
    color: #1d1d1f;
}
.threat-message-box .text strong { color: #d70015; }

/* Urgent Timer */
.urgent-timer {
    background: #fff9f9;
    border: 1px solid #ffd1d1;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.urgent-timer .text {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 15px;
    flex: 1;
}
.urgent-timer .text span { color: #d70015; text-decoration: underline; }
.urgent-timer .countdown {
    font-size: 24px;
    font-weight: 700;
    color: #d70015;
    background: #ffffff;
    padding: 4px 16px;
    border-radius: 40px;
    border: 1px solid #e5e5ea;
    font-variant-numeric: tabular-nums;
}

/* Progress */
.progress-section { margin-bottom: 24px; }
.progress-row {
    display: flex; justify-content: space-between; font-size: 14px; color: #86868b; margin-bottom: 6px;
}
.progress-row .percent { color: #d70015; font-weight: 600; }
.progress-track { height: 6px; background: #e5e5ea; border-radius: 20px; overflow: hidden; }
.progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #ff3b30, #ff9500);
    border-radius: 20px; transition: width 0.15s linear;
}

/* Threat List */
.threat-list {
    background: #ffffff; border-radius: 18px; padding: 6px 0; margin-bottom: 20px;
    border: 1px solid #e5e5ea; max-height: 230px; overflow-y: auto;
}
.threat-item {
    display: flex; align-items: center; gap: 14px; padding: 12px 20px;
    border-bottom: 1px solid #ececf0; color: #1d1d1f; font-size: 15px;
    opacity: 0; transform: translateY(-8px);
    transition: all 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.threat-item.show { opacity: 1; transform: translateY(0); }
.threat-item:last-child { border-bottom: none; }
.threat-item .icon { width: 30px; color: #d70015; font-size: 18px; text-align: center; }
.threat-item .info { flex: 1; }
.threat-item .info .title { font-weight: 600; }
.threat-item .info .desc { font-size: 13px; color: #86868b; }
.threat-item .badge {
    font-size: 12px; font-weight: 600; padding: 2px 12px; border-radius: 30px;
    background: #ffebeb; color: #d70015; border: 1px solid #ffc5c5;
}

/* Warning Message */
.lock-warning {
    background: #fff5f5; border-radius: 16px; padding: 16px 20px; margin-bottom: 20px;
    border-left: 6px solid #d70015; border: 1px solid #ffc5c5; border-left-width: 6px;
    display: flex; align-items: center; gap: 14px;
}
.lock-warning i { font-size: 28px; color: #d70015; }
.lock-warning .text { flex: 1; font-size: 15px; line-height: 1.5; color: #1d1d1f; }
.lock-warning .text strong { color: #d70015; }

/* =========================================== */
/*  الزر الاحترافي (تم حذف السطر نهائياً)       */
/* =========================================== */
.apple-btn,
a.apple-btn,
#scanBtn {
    width: 100%; padding: 18px; border: none; border-radius: 60px; font-size: 18px; font-weight: 600;
    color: #ffffff; 
    text-decoration: none !important; /* الحل الحاسم لحذف الخط */
    background: linear-gradient(to bottom, #6eb0ff 0%, #007AFF 100%);
    border: 1px solid #0055cc;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
    gap: 14px; margin-top: 6px; letter-spacing: 0.3px;
}
.apple-btn:hover, a.apple-btn:hover, #scanBtn:hover { background: linear-gradient(to bottom, #5c9eff 0%, #0066d6 100%); box-shadow: 0 8px 28px rgba(0, 122, 255, 0.4); transform: scale(1.02); }
.apple-btn:active, a.apple-btn:active, #scanBtn:active { transform: scale(0.97); }
.apple-btn:disabled, a.apple-btn:disabled, #scanBtn:disabled { opacity: 0.5; transform: scale(1); box-shadow: none; }

/* Danger Alert */
.apple-alert {
    display: none; background: #fff5f5; border: 2px solid #d70015; border-radius: 20px;
    padding: 24px 24px; margin: 24px 0 16px; animation: slideAlert 0.5s ease;
}
@keyframes slideAlert { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
.apple-alert .title {
    font-size: 22px; font-weight: 700; color: #d70015; display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
}
.apple-alert .desc { color: #1d1d1f; line-height: 1.6; font-size: 15px; }
.apple-alert .desc strong { color: #d70015; font-size: 17px; }
.apple-alert .actions { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.apple-alert .actions a {
    flex: 1; min-width: 140px; padding: 16px 20px; text-align: center; border-radius: 40px;
    font-weight: 600; text-decoration: none; font-size: 16px; background: #007AFF; color: #fff; transition: 0.2s;
}
.apple-alert .actions a:hover { background: #0066d6; }
.apple-alert .actions a.secondary { background: transparent; color: #d70015; border: 1px solid #e5e5ea; }

/* Footer */
.apple-footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e5e5ea; display: flex; justify-content: space-between; flex-wrap: wrap; font-size: 12px; color: #86868b; gap: 8px; }
.apple-footer .links a { color: #86868b; text-decoration: none; margin-right: 14px; }
.apple-footer .links a:hover { color: #007AFF; }

/* Responsive Design (Phone & Desktop) */
@media (max-width: 550px) {
    .apple-card { padding: 24px 16px; }
    .apple-header { padding: 12px 16px; margin: -24px -16px 24px -16px; }
    .apple-logo { font-size: 17px; gap: 8px; }
    .apple-badge { font-size: 11px; padding: 3px 12px; }
    .device-box { flex-wrap: wrap; }
    .urgent-timer { flex-direction: column; align-items: stretch; }
    .urgent-timer .countdown { align-self: flex-start; margin-top: 6px; }
    .apple-btn, a.apple-btn, #scanBtn { font-size: 16px; padding: 16px; }
    .apple-alert .actions a { min-width: 100px; font-size: 14px; }
}