@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

:root {
    --primary: #3182f6;
    --primary-hover: #1b64da;
    --bg: #f0f4f9;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text: #191f28;
    --text-sub: #4e5968;
    --border: rgba(0, 0, 0, 0.04);
}

* {
    cursor: none !important;
    box-sizing: border-box;
}

body, button, input, select, textarea {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif !important;
}

body {
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 기울어진 격자 무늬 배경 */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: rotate(15deg);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 80px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Card Style */
.main-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px 32px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

h2 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 32px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-sub);
    padding-left: 4px;
}

input {
    width: 100%;
    padding: 18px 20px;
    border-radius: 16px;
    font-size: 17px;
    background: white;
    border: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--text);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.1);
}

input::placeholder {
    color: #adb5bd;
}

#code-status {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
    padding-left: 4px;
}

/* Buttons */
.btn-group {
    margin-top: 40px;
}

button {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

button:disabled {
    background-color: #ccd2d9;
    cursor: not-allowed;
}

button:active:not(:disabled) {
    transform: scale(0.97);
    filter: brightness(0.9);
}

/* Result View */
#result-view {
    text-align: center;
}

.result-display {
    background: white;
    padding: 24px;
    border-radius: 20px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

.result-label {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 8px;
    display: block;
}

.result-url {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    word-break: break-all;
}

/* Cursor */
.cursor {
    width: 20px;
    height: 20px;
    background: rgba(49, 130, 246, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s, border 0.3s;
    opacity: 0;
}

.cursor.hover {
    width: 50px;
    height: 50px;
    background: rgba(49, 130, 246, 0.1);
    border-color: var(--primary);
}

/* Foldable Section */
.custom-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 4px;
    cursor: pointer;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    user-select: none;
    transition: opacity 0.2s;
}

.custom-toggle:hover {
    opacity: 0.8;
}

.custom-toggle i {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-toggle.active i {
    transform: rotate(180deg);
}

#custom-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

#custom-section.active {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
}

/* Toast */
#copy-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    display: none;
    opacity: 0;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}
