@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    animation: backgroundMove 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-3%, -3%) rotate(5deg);
    }
}

.container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-top: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Header Buttons */
.header-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.header-btn {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}

.header-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.header-btn:hover::before {
    width: 300px;
    height: 300px;
}

.header-btn-white {
    background: white;
    color: #667eea;
}

.header-btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.4);
}

.header-btn-red {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.header-btn-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.5);
}

.header-btn i,
.header-btn span {
    position: relative;
    z-index: 1;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.section {
    display: none;
    position: relative;
    z-index: 1;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Ensure form elements are clickable */
input, textarea, select, button {
    position: relative;
    z-index: 1;
}

.section h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 40px;
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 20px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Gift Cards */
.gift-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gift-card {
    position: relative;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.gift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gift-card:hover::before {
    opacity: 1;
}

.gift-card:nth-child(1) {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.gift-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gift-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gift-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gift-card:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gift-card:nth-child(6) {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.gift-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.gift-card i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.gift-card:hover i {
    animation: iconBounce 0.6s ease;
}

.gift-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gift-card p {
    opacity: 0.95;
    font-size: 1rem;
    line-height: 1.6;
}

.gift-card::after {
    content: '→';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.gift-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary i,
.btn-secondary i {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.btn-primary span,
.btn-secondary span {
    position: relative;
    z-index: 1;
}

.back-btn {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Cairo', sans-serif;
}

.back-btn:hover {
    color: #764ba2;
}

/* Gift Result */
.gift-result {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 50px;
    border-radius: 20px;
    margin-bottom: 30px;
    min-height: 300px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.gift-result::before {
    content: '❤️';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.2;
    animation: heartbeat 2s infinite;
}

.gift-result::after {
    content: '✨';
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.2;
    animation: sparkle 3s infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.4;
    }
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

.footer i {
    color: #ff6b6b;
    animation: heartbeat 1.5s infinite;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .gift-types {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .main-content {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .header-buttons {
        margin-top: 20px;
        gap: 12px;
    }
    
    .header-btn {
        padding: 12px 22px;
        font-size: 1rem;
    }
    
    .main-content {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .gift-types {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gift-card {
        padding: 35px 25px;
    }
    
    .gift-card i {
        font-size: 3.5rem;
    }
    
    .gift-card h3 {
        font-size: 1.4rem;
    }
    
    .gift-card::after {
        display: none;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .gift-result {
        padding: 30px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .gift-card:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .btn-primary:hover,
    .btn-secondary:hover,
    .header-btn:hover {
        transform: translateY(-2px);
    }
    
    .gift-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active,
    .btn-secondary:active,
    .header-btn:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .header-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .header-btn span {
        display: inline;
    }
    
    .main-content {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .section h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .gift-card {
        padding: 30px 20px;
    }
    
    .gift-card i {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .gift-card h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .gift-card p {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .gift-result {
        padding: 25px 15px;
    }
}
