@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #f472b6;
    --bg-color: #f0f9ff; /* Very soft blue */
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 20px;
    --shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Cute background decoration */
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,0) 0, hsla(253,16%,7%,0) 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0) 0, hsla(225,39%,30%,0) 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0) 0, hsla(339,49%,30%,0) 50%);
    background-size: 100% 100%;
}

/* Background Blobs */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-section {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Card Styling */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow);
    border: 1px solid white;
    position: relative;
    overflow: hidden;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #f8fafc;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* File Input Customization */
input[type="file"] {
    width: 100%;
    padding: 0.7rem;
    background: #f8fafc;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
}
input[type="file"]:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}
input[type="file"]::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-right: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
}

button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.3);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Preview */
#preview-container {
    margin-bottom: 1.5rem;
    display: none;
    text-align: center;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
}

#image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Share Section */
.share-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border);
    display: none;
    text-align: center;
}

.share-section .subtitle {
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 600;
}

.link-box {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

/* View Page */
.view-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.protected-image-container {
    max-width: 1000px;
    max-height: 80vh;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    background: white;
}

.protected-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    filter: blur(25px);
    transition: filter 1s ease;
}

.protected-image.unlocked {
    filter: blur(0);
}

/* Friendly Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.emoji-icon {
    display: none;
}

.error-msg {
    color: #ef4444;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
    background: #fef2f2;
    padding: 0.5rem;
    border-radius: 8px;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 4rem;
    text-align: center;
}

.feature-item h3 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-icon {
    font-size: 0; 
    
    /* Center whatever content */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Fallback */
    background-color: white;
    
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    margin: 0 auto 1rem auto;
}

/* CSS-only icons */
.feature-item:nth-child(1) .feature-icon::before {
    /* Upload / Square */
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary);
    border-radius: 4px;
}

.feature-item:nth-child(2) .feature-icon::before {
    /* Lock Body */
    content: '';
    width: 18px;
    height: 14px;
    border: 2px solid var(--primary);
    border-radius: 2px;
    margin-top: 6px;
    position: relative;
    box-shadow: 0 -8px 0 -2px white, 0 -11px 0 -2px var(--primary); /* Lock Shackle */
}

.feature-item:nth-child(3) .feature-icon::before {
    /* Link */
    content: '';
    width: 20px;
    height: 10px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    transform: rotate(-45deg);
}
