:root {
    --primary-600: #3B82F6;
    --primary-700: #2563EB;
    --purple-600: #8B5CF6;
    --purple-700: #7C3AED;
    --success-500: #10B981;
    --success-600: #059669;
    --warning-500: #F59E0B;
    --warning-600: #D97706;
    --error-500: #EF4444;
    --error-600: #DC2626;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 50%, #F0F9FF 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.08) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.top-banner {
    background: linear-gradient(90deg, var(--purple-600), var(--primary-600));
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.top-banner i {
    font-size: 16px;
}

.close-btn {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

.fmi-hero {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #60A5FA 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.fmi-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.6;
}

.fmi-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.4);
}

.hero-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #10B981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0;
}

.fmi-container {
    max-width: 1400px;
    margin: -40px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
}

.fmi-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.glass-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    z-index: 1;
}

.check-card {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.check-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.check-icon-header {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--purple-600), var(--primary-600));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-icon-header svg {
    width: 30px;
    height: 30px;
    color: white;
}

.check-title h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin: 0 0 5px 0;
    font-weight: 700;
}

.check-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-select,
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
    color: var(--gray-900);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.check-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--purple-600), var(--primary-600));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-card,
.result-card {
    animation: slideUp 0.5s ease;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.header-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon.error {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: var(--error-600);
}

.header-icon.success {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: var(--success-600);
}

.header-icon.warning {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: var(--warning-600);
}

.header-icon svg {
    width: 24px;
    height: 24px;
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin: 0;
    font-weight: 700;
}

.error-content,
.result-content {
    color: var(--gray-700);
}

.error-content p {
    margin-bottom: 20px;
    font-size: 1rem;
}

.btn-outline {
    padding: 14px 28px;
    background: linear-gradient(135deg, white, #F9FAFB);
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.result-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-600), var(--purple-600));
    border-radius: 2px;
}

.result-header h3 {
    font-size: 1.4rem;
    color: var(--gray-800);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.result-header h3::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
}

.result-icon {
    display: none;
}

.status-display {
    padding: 0;
    margin-bottom: 35px;
    position: relative;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-badge-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.status-badge-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.status-text {
    line-height: 1;
}

/* iCloud Lock Status Colors */
.status-off {
    color: #059669;
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border: 2px solid rgba(16, 185, 129, 0.4);
}

.status-on {
    color: #DC2626;
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.status-unknown {
    color: #6B7280;
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    border: 2px solid rgba(156, 163, 175, 0.4);
}

/* Lost/Stolen Status Colors */
.status-lost {
    color: #B91C1C;
    background: linear-gradient(135deg, #FEE2E2, #FCA5A5);
    border: 2px solid rgba(185, 28, 28, 0.4);
}

.status-safe {
    color: #047857;
    background: linear-gradient(135deg, #D1FAE5, #6EE7B7);
    border: 2px solid rgba(4, 120, 87, 0.4);
}

/* Clean Status Colors */
.status-clean {
    color: #0369A1;
    background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
    border: 2px solid rgba(3, 105, 161, 0.4);
}

.status-not-clean {
    color: #C2410C;
    background: linear-gradient(135deg, #FED7AA, #FDBA74);
    border: 2px solid rgba(194, 65, 12, 0.4);
}

.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    flex-shrink: 0;
}

.status-off .status-indicator {
    background: #10B981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
}

.status-on .status-indicator {
    background: #EF4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.status-unknown .status-indicator {
    background: #9CA3AF;
    box-shadow: 0 0 12px rgba(156, 163, 175, 0.4);
}

.status-lost .status-indicator {
    background: #DC2626;
    box-shadow: 0 0 16px rgba(220, 38, 38, 0.6);
}

.status-safe .status-indicator {
    background: #059669;
    box-shadow: 0 0 16px rgba(5, 150, 105, 0.6);
}

.status-clean .status-indicator {
    background: #0284C7;
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.6);
}

.status-not-clean .status-indicator {
    background: #EA580C;
    box-shadow: 0 0 16px rgba(234, 88, 12, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.15);
    }
}

.result-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 30px;
}

.detail-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.detail-item::before {
    display: none;
}

.detail-item:hover {
    border-color: var(--primary-400);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(239, 246, 255, 0.5));
}

.detail-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.detail-label::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    border-radius: 50%;
    flex-shrink: 0;
}

.detail-value {
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1rem;
    word-break: break-word;
    text-align: right;
}

.text-success {
    color: var(--success-500);
}

.text-warning {
    color: var(--warning-500);
}

.text-danger {
    color: #EF4444;
    font-weight: 600;
}

.result-info {
    margin-bottom: 20px;
}

.info-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
}

.info-box.success {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border-color: var(--success-600);
}

.info-box.warning {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-color: var(--warning-600);
}

.info-box svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box.success svg {
    color: var(--success-600);
}

.info-box.warning svg {
    color: var(--warning-600);
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.info-box.success strong {
    color: var(--success-700);
}

.info-box.warning strong {
    color: var(--warning-700);
}

.info-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-box.success p {
    color: var(--success-900);
}

.info-box.warning p {
    color: var(--warning-900);
}

.info-card {
    position: sticky;
    top: 20px;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.info-card-header svg {
    width: 24px;
    height: 24px;
    color: var(--primary-600);
}

.info-card-header h3 {
    font-size: 1.3rem;
    color: var(--gray-900);
    margin: 0;
    font-weight: 700;
}

.info-card-content p {
    color: var(--gray-700);
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-card-content h4 {
    font-size: 1.05rem;
    color: var(--gray-800);
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.info-card-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.info-card-content li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--gray-700);
}

.info-card-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-600);
    font-weight: bold;
}

.tips-card {
    position: sticky;
    top: 20px;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
}

.tip-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.tip-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tip-item strong {
    display: block;
    color: var(--gray-800);
    margin-bottom: 5px;
    font-size: 1rem;
}

.tip-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

@media (max-width: 1024px) {
    .fmi-main {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        order: -1;
    }
    
    .info-card,
    .tips-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .check-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .check-title h2 {
        font-size: 1.5rem;
    }
    
    .status-display {
        padding: 0;
        margin-bottom: 25px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .status-badge {
        font-size: 1.1rem;
        padding: 14px 24px;
        min-width: 140px;
        gap: 8px;
    }
    
    .status-badge-label {
        font-size: 0.7rem;
    }
    
    .status-indicator {
        width: 14px;
        height: 14px;
    }
    
    .result-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .detail-item {
        padding: 14px 16px;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .detail-label {
        min-width: auto;
        font-size: 0.85rem;
    }
    
    .detail-value {
        text-align: left;
        font-size: 0.95rem;
    }
    
    .result-header h3 {
        font-size: 1.2rem;
    }
    
    .result-header h3::before {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .fmi-container {
        padding: 0 15px 40px;
    }
}
