:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --background-color: #f0f4f8;
    --text-color: #333;
    --card-bg-color: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
}

.app-container {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 3vh 0;
}

.app-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    text-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1);
}

.card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.5vh 1vh rgba(0,0,0,0.1);
    background-color: var(--card-bg-color);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.frame-option {
    text-align: center;
}

.overlay-thumb {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 0.2rem solid transparent;
    border-radius: 1rem;
    max-width: 100%;
    height: auto;
}

.overlay-thumb:hover, .overlay-thumb:focus {
    transform: scale(1.05);
    box-shadow: 0 1vh 3vh rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.frame-name {
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.final-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 100%;
}

#finalImage {
    max-width: 100%;
    height: auto;
    box-shadow: 0 1vh 2vh rgba(0,0,0,0.1);
    border-radius: 1rem;
}

.btn {
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 1vh 2vh rgba(0,0,0,0.1);
}

.fade-out {
    opacity: 0;
    transform: translateY(-1rem);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

#loadingSpinner {
    z-index: 1050;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 2vh 0;
    font-size: 0.875rem;
}

.img-container {
    max-width: 100%;
    max-height: 70vh;
    margin: auto;
}

#cropperImage {
    max-width: 100%;
    display: block;
}

.cropper-container {
    touch-action: none;
}

.cropper-view-box,
.cropper-face {
    outline: none !important;
    box-shadow: 0 0 0 0.0625rem #39f;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

.social-share {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-btn {
    width: auto;
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .app-container {
        max-width: 90%;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
}

@media (min-width: 576px) {
    .app-container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 720px;
    }

    .app-title {
        font-size: 2.5rem;
    }

    .card-title {
        font-size: 1.75rem;
    }

    .frame-name {
        font-size: 1.25rem;
    }

    .btn {
        font-size: 1.125rem;
    }

    footer {
        font-size: 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }
}

@media (min-width: 992px) {
    .app-container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .app-container {
        max-width: 1140px;
    }

    .app-title {
        font-size: 3rem;
    }

    .card-title {
        font-size: 2rem;
    }

    .frame-name {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 1.25rem;
    }

    footer {
        font-size: 1.125rem;
    }

    .card-body {
        padding: 2rem;
    }
}