@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: rgba(13, 115, 119, 0.2);
    color: #3d3d3d;
}

:root {
    --sacred-teal: #5a8a89;
    --soft-cream: #f5f2ed;
    --ink-brown: #6b5d52;
    --light-border: #e5dfd5;
    --accent-gold: #c9a961;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: var(--ink-brown);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(90, 138, 137, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

@keyframes woodShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: flex-start;
    background: rgba(245, 242, 237, 0.98);
    backdrop-filter: blur(20px);
    padding: 80px 70px;
    border-radius: 24px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: 8px;
    z-index: 1;
}

.container::after {
    content: '✦';
    position: absolute;
    top: 40px;
    right: 50px;
    font-size: 2rem;
    color: var(--accent-gold);
    opacity: 0.4;
    animation: gentleRotate 20s linear infinite;
    filter: drop-shadow(0 0 10px rgba(201, 169, 97, 0.5));
}

@keyframes gentleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* HERO SECTION */
.hero {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 24px;
    position: relative;
    z-index: 2;
    padding-right: 40px;
    border-right: 1px solid var(--light-border);
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.2s forwards;
}

@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}

/* Copy feedback tooltip */
.copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--sacred-teal);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: none;
    z-index: 10;
    animation: copyFeedback 0.6s ease-out forwards;
    box-shadow: 0 4px 12px rgba(13, 115, 119, 0.4);
}

@keyframes copyFeedback {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

h1 {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--ink-brown);
    line-height: 1.3;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.4s forwards;
    letter-spacing: 0.02em;
}

/* Tap instruction styles */
.tap-instruction {
    width: 100%;
    background: linear-gradient(135deg, rgba(90, 138, 137, 0.1) 0%, rgba(90, 138, 137, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(90, 138, 137, 0.3);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    box-shadow: 
        0 4px 15px rgba(90, 138, 137, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.8s ease-out 0.8s forwards, gentlePulse 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(90, 138, 137, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(90, 138, 137, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
}

.tap-icon {
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 1.1rem;
    opacity: 0.6;
}

.tap-title {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--sacred-teal);
}

.tap-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    color: var(--ink-brown);
    opacity: 0.75;
}

@keyframes shimmerTitle {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.tagline {
    font-size: 1rem;
    color: var(--ink-brown);
    margin-top: -12px;
    opacity: 0.7;
    animation: fadeIn 0.8s ease-out 0.6s forwards;
    line-height: 1.7;
}

.install-btn {
    display: inline-block;
    background: var(--sacred-teal);
    color: white;
    padding: 16px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.3s ease;
    margin-top: 12px;
    opacity: 1;
    animation: buttonPulse 3s ease-in-out 2s infinite;
}

@keyframes buttonPulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(13, 115, 119, 0.25);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(13, 115, 119, 0.4),
                    0 0 0 4px rgba(13, 115, 119, 0.1);
    }
}

.install-btn:hover {
    background: #0a5f62;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(13, 115, 119, 0.4);
}

.install-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1s forwards;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    font-weight: 700;
    color: var(--sacred-teal);
    font-size: 0.9rem;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.step-text {
    font-size: 0.85rem;
    color: var(--ink-brown);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    opacity: 0.8;
}

.step-arrow {
    font-size: 1rem;
    color: var(--accent-gold);
    opacity: 0.4;
}

.footer-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light-border);
    text-align: left;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.2s forwards;
}

.footer-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-brown);
    opacity: 0.7;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer-info .small-text {
    margin-top: 6px;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* SHORTCUTS GRID */
.grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    opacity: 0;
    position: relative;
    z-index: 2;
    animation: gridAppear 0.8s ease-out 0.6s forwards;
}

@keyframes gridAppear {
    from {
        opacity: 0;
        transform: scale(0.98);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
    }
}

/* SHORTCUT CARDS */
.shortcut {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    min-height: 140px;
    overflow: visible;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    animation: cardReveal 0.5s ease-out forwards;
}

.shortcut:nth-child(1) { animation-delay: 0.7s; }
.shortcut:nth-child(2) { animation-delay: 0.75s; }
.shortcut:nth-child(3) { animation-delay: 0.8s; }
.shortcut:nth-child(4) { animation-delay: 0.85s; }
.shortcut:nth-child(5) { animation-delay: 0.9s; }
.shortcut:nth-child(6) { animation-delay: 0.95s; }
.shortcut:nth-child(7) { animation-delay: 1s; }
.shortcut:nth-child(8) { animation-delay: 1.05s; }
.shortcut:nth-child(9) { animation-delay: 1.1s; }
.shortcut:nth-child(10) { animation-delay: 1.15s; }
.shortcut:nth-child(11) { animation-delay: 1.2s; }
.shortcut:nth-child(12) { animation-delay: 1.25s; }
.shortcut:nth-child(13) { animation-delay: 1.3s; }
.shortcut:nth-child(14) { animation-delay: 1.35s; }
.shortcut:nth-child(15) { animation-delay: 1.4s; }
.shortcut:nth-child(16) { animation-delay: 1.45s; }
.shortcut:nth-child(17) { animation-delay: 1.5s; }
.shortcut:nth-child(18) { animation-delay: 1.55s; }
.shortcut:nth-child(19) { animation-delay: 1.6s; }
.shortcut:nth-child(20) { animation-delay: 1.65s; }
.shortcut:nth-child(21) { animation-delay: 1.7s; }

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



.shortcut:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(90, 138, 137, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(90, 138, 137, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.text {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
    align-items: flex-end;
    padding: 4px 0;
}

.shortcut code {
    background: linear-gradient(135deg, var(--sacred-teal) 0%, #0a5f62 100%);
    color: white;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 4px 12px rgba(13, 115, 119, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.shortcut code::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    z-index: -1;
}

.shortcut:hover code {
    transform: scale(1.08) rotate(-1deg);
    box-shadow: 
        0 6px 20px rgba(13, 115, 119, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.shortcut:hover code::after {
    animation: badgeShimmer 0.8s ease-out;
}

@keyframes badgeShimmer {
    from { left: -100%; }
    to { left: 100%; }
}

.shortcut .arabic {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink-brown);
    direction: rtl;
    transition: all 0.3s ease;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: normal;
    word-wrap: break-word;
    text-align: right;
    width: 100%;
}

.shortcut .arabic-long {
    font-size: 1.15rem;
}

.shortcut .english {
    font-family: 'Georgia', serif;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    white-space: normal;
    word-wrap: break-word;
    transition: all 0.3s ease;
    text-align: right;
    width: 100%;
}

.shortcut:hover .arabic {
    color: var(--sacred-teal);
    transform: scale(1.05);
    text-shadow: 
        0 0 30px rgba(90, 138, 137, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.shortcut:hover .english {
    color: var(--sacred-teal);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TABLET LANDSCAPE & DESKTOP SMALL (1024px - 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 1100px;
        gap: 45px;
        padding: 55px 40px;
    }
    
    .container::after {
        left: 300px;
    }
    
    .hero {
        flex: 0 0 300px;
    }
    
    h1 {
        font-size: 2.6rem;
    }
    
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 11px;
    }
}

/* TABLET PORTRAIT (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        gap: 40px;
        padding: 50px 35px;
    }
    
    .hero {
        flex: 0 0 280px;
    }
    
    h1 {
        font-size: 2.4rem;
    }
    
    .tagline {
        font-size: 1.05rem;
    }
    
    .install-btn {
        padding: 15px 38px;
        font-size: 1.05rem;
    }
    
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .shortcut {
        padding: 17px 19px;
        gap: 15px;
    }
    
    .shortcut .arabic {
        font-size: 1.4rem;
    }
    
    .shortcut .arabic-long {
        font-size: 1.05rem;
    }
}

/* MOBILE LANDSCAPE & TABLET SMALL (600px - 768px) */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 20px 15px;
    }
    
    .container {
        flex-direction: column;
        gap: 35px;
        padding: 45px 30px;
    }
    
    .container::after {
        top: 20px;
        right: 30px;
        font-size: 1.5rem;
    }
    
    .hero {
        flex: none;
        width: 100%;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding-right: 0;
        border-right: none;
        padding-bottom: 35px;
        border-bottom: 1px solid var(--light-border);
    }
    
    .logo {
        width: 110px;
        height: 110px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .tagline {
        font-size: 1rem;
        margin-top: -10px;
    }
    
    .install-btn {
        width: 100%;
        max-width: 420px;
        padding: 16px 40px;
        font-size: 1.05rem;
    }
    
    .install-steps {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 420px;
    }
    
    .step {
        width: 100%;
        justify-content: center;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .footer-info {
        text-align: center;
    }
    
    .grid {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .shortcut {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 16px 14px;
    }
    
    .shortcut code {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .text {
        width: 100%;
        align-items: center;
    }
    
    .shortcut .arabic {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .shortcut .arabic-long {
        font-size: 1rem;
    }
    
    .shortcut .english {
        font-size: 0.7rem;
        text-align: center;
    }
}

/* MOBILE PORTRAIT (480px - 600px) */
@media (max-width: 600px) {
    body {
        padding: 15px 12px;
    }
    
    .container {
        padding: 35px 22px;
        gap: 30px;
    }
    
    .logo {
        width: 95px;
        height: 95px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    .install-btn {
        padding: 15px 36px;
        font-size: 1rem;
    }
    
    .grid {
        gap: 9px;
    }
    
    .shortcut {
        padding: 15px 13px;
    }
    
    .shortcut .arabic {
        font-size: 1.25rem;
    }
    
    .shortcut .arabic-long {
        font-size: 0.95rem;
    }
    
    .shortcut .english {
        font-size: 0.68rem;
    }
}

/* MOBILE SMALL (< 480px) */
@media (max-width: 480px) {
    body {
        padding: 12px 10px;
    }
    
    .container {
        padding: 30px 18px;
        gap: 28px;
    }
    
    .logo {
        width: 85px;
        height: 85px;
    }
    
    h1 {
        font-size: 1.85rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .install-btn {
        padding: 14px 32px;
        font-size: 0.95rem;
    }
    
    .device-info {
        font-size: 0.75rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .shortcut {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 16px;
        gap: 12px;
    }
    
    .shortcut code {
        font-size: 0.7rem;
        padding: 5px 11px;
    }
    
    .text {
        align-items: flex-end;
    }
    
    .shortcut .arabic {
        font-size: 1.15rem;
        text-align: right;
    }
    
    .shortcut .arabic-long {
        font-size: 0.9rem;
    }
    
    .shortcut .english {
        font-size: 0.65rem;
        text-align: right;
    }
}

/* MOBILE EXTRA SMALL (< 360px) */
@media (max-width: 360px) {
    .container {
        padding: 25px 15px;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    .shortcut {
        padding: 13px 14px;
    }
    
    .shortcut .arabic {
        font-size: 1.1rem;
    }
    
    .shortcut .arabic-long {
        font-size: 0.85rem;
    }
}
