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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-section {
    width: 100%;
}

.input-section {
    width: 100%;
}

h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-form {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

label {
    display: inline-block;
    color: #2c3e50;
    white-space: nowrap;
}

input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    height: 38px;
}

input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.greeting-card {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 1;
}

#cardCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.effect-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: background 0.3s ease;
    white-space: nowrap;
    height: 38px;
    line-height: 1;
}

.effect-button:hover {
    background: #2980b9;
}

.effect-button.disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.7;
}

.effect-button.disabled:hover {
    background: #bdc3c7;
}

@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f1c40f;
    animation: confetti 5s linear forwards;
    z-index: 1000;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Remove unused styles */
.card-image,
.card-content,
.name {
    display: none;
}

/* Text animation */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

/* Loading message */
.loading-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loader styles */
.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-content p {
    color: #2c3e50;
    font-family: 'Cairo', sans-serif;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive styles */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }

    .container {
        gap: 0.5rem;
    }

    h1 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .card-form {
        padding: 0.75rem;
    }

    .form-group {
        gap: 0.5rem;
    }

    .greeting-card {
        max-width: 100%;
    }

    .controls {
        gap: 0.25rem;
    }

    .effect-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        height: 38px;
    }

    input {
        height: 38px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    label {
        text-align: center;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .effect-button {
        width: 100%;
        height: 38px;
    }

    input {
        height: 38px;
    }
}

/* Custom Alert */
.custom-alert {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    font-family: 'Cairo', sans-serif;
}

.alert-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 90%;
    width: 400px;
    animation: alertSlideIn 0.3s ease-out;
}

.alert-content p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
    line-height: 1.5;
}

.alert-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.alert-button:hover {
    background-color: #2980b9;
}

@keyframes alertSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
} 