:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1b1b1b;
    --accent-color: #4fc3f7;
    --dark-color: #000000;
    --light-color: #f8f9fa;
    --success-color: #4669d1;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}
@supports (-webkit-touch-callout: none) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --status-bar-color: #000000;
  }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Vazir, sans-serif;
}
a {
    text-decoration: none;
    color: var(--success-color);
}
body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #f8f9fa;
    line-height: 1.6;
    overflow-x: hidden;
}


#loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header Styles */
header {
    position: relative;
    background: radial-gradient(ellipse at 50% 50%, #0f0f0f 0%, #000 100%);
    color: #f8f9fa;
    padding: 4rem 0;
    text-align: right;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
header::before,
header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: 0;
}
header::before {
    top: -20%;
    left: -20%;
    width: 80vw;
    height: 80vw;
    animation: float 20s ease-in-out infinite;
}
header::after {
    bottom: -30%;
    right: -30%;
    width: 60vw;
    height: 60vw;
    animation: float 25s ease-in-out infinite reverse;
}
header .container {
    position: relative;
    z-index: 1;
}
header .download img {
    display: inline-block;
    margin: 0.5rem;
}

/* Header Layout */
.header-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.header-text p {
    font-size: 2rem;
    margin-top: -2rem;
    padding-bottom: 3rem;
    opacity: 0.4;
}
.header-text {
    text-align: right;
}

.header-text h1 {
    font-size: clamp(4rem, 8vw, 7rem);
    margin-bottom: 1rem;
    color: var(--light-color);
    text-shadow: 3px 3px 3px #000;
}

.phone-mockup {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media screen and (max-width: 980px) {
    .header-text p {
        font-size: 1.7rem;
        margin-top: -1rem;
        padding-bottom: 3rem;
        opacity: 0.4;
    }
    header .download img {
        display: block;
        height: 65px;
    }
    header .download .myket{
        margin: 0.5rem auto;
    }
    header .download .cafebazar {
        margin: 0.5rem auto;
    }
}
.screenshot {
    width: 280px;
    height: auto;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.6s ease;
    border: 0.3rem #eee solid;
}

.phone-mockup:hover .screenshot {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05);
}
/* Navigation پایه - دسکتاپ */
nav {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin: 1rem auto;
    width: 90%;
    max-width: 1000px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(20px) saturate(1.7) brightness(0.85);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    animation: slideDown 0.8s ease forwards;
    transition: all 0.6s ease;
}

@keyframes slideDown {
    to { transform: translateY(0); }
}

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    transition: all 0.6s ease;
}

nav li {
    margin: 0.25rem;
    transition: all 0.6s ease;
}

nav a {
    color: #f8f9fa;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 195, 247, 0.4);
}

/* دکمه همبرگری (مخفی در دسکتاپ) */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.4rem;
    margin: 1.5rem;
}
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
  }
  nav ul.show {
    display: flex;
  }
  nav li a {
    padding: 1rem;
    border-radius: 12px;
  }
  nav li:last-child a {
    border-bottom: none;
  }
  #nav-toggle {
    display: inline-block;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
  }
}

/* Section Styles */
.section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}
.section.visible {
    opacity: 1;
    transform: translateY(0);
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}
h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}
h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

/* About Section */
.about-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.about-content img {
    max-width: 100%;
    border-radius: 15px;
    margin-bottom: 2rem;
}
.about-text p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: justify;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.skill-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    transform: scale(0.9);
    opacity: 100;
}
.skill-card.animate {
    animation: fadeInScale 0.6s ease forwards;
}
@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.skill-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(79, 195, 247, 0.2);
}
.skill-card i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--accent-color), #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}


.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.app-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    transform: translateY(40px);
    opacity: 100;
}
.app-card.animate {
    animation: fadeInUpCard 0.6s ease forwards;
}
@keyframes fadeInUpCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(79, 195, 247, 0.2);
}
.app-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.app-card-content {
    padding: 1.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), #00bcd4);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 195, 247, 0.4);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    .skills-grid, .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .screenshot {
        width: 220px;
        margin: 2rem auto 0;
    }
    
    .header-text {
        text-align: center;
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(180deg); }
}

#tutorial strong {
    color: var(--accent-color);
}
#tutorial h4 {
    font-size: 1.5rem;
    color: #fff;
}
#tutorial {
    color: #bcbcbc;
    font-size: 1.2rem;
}
#tutorial img {
    box-shadow: 0px 10px 40px rgba(0,0,0,0.3);
}

/* new codes */

.feedback-btn {
    margin-top: 2rem;
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    border: none;
    color: #000;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Vazir, sans-serif;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.3);
    position: relative;
    overflow: hidden;
}

.feedback-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.feedback-btn:hover::before {
    left: 100%;
}

.feedback-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(79, 195, 247, 0.5);
}


.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: backdropBlur 0.4s ease;
}

@keyframes backdropBlur {
    from { backdrop-filter: blur(0px); }
    to { backdrop-filter: blur(5px); }
}

.modal-dialog {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(20px) saturate(1.8) brightness(0.85);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(-50px) rotateX(15deg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0) rotateX(0deg);
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    transform: scale(1.2) rotate(90deg);
    background: rgba(255, 255, 255, 0.15);
}

.modal h3 {
    color: #4fc3f7;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    font-weight: bold;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: Vazir, sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #4fc3f7;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3), inset 0 1px 3px rgba(0,0,0,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    direction: ltr;
    justify-content: center;
    margin: 1rem 0;
}

.star-rating i {
    color: #555;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.star-rating i:hover,
.star-rating i.active {
    color: #ffd700;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    border: none;
    color: #000;
    font-weight: bold;
    padding: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Vazir, sans-serif;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 195, 247, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}


@media (max-width: 600px) {
    .modal-dialog {
        padding: 2rem;
        margin: 0.5rem;
        border-radius: 20px;
    }
    
    .modal h3 {
        font-size: 1.5rem;
    }
    
    .star-rating i {
        font-size: 1.5rem;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.feedback-btn:active {
    animation: pulse 0.2s ease;
}