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

.card-page {
    background-color: #f1f2f4; 
    min-height: calc(100vh - 80px);
}

/* 배경을 어둡게 덮는 레이어 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 중앙 화이트 박스 */
.modal-content {
    position: relative;
    background: #fff;
    padding: 50px;    
    border-radius: 20px;
    text-align: center;
}

/* 화이트 박스 기준으로 글자 위에 배치 */
.modal-content h2 {      
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    text-align: center;
}

/* 두 박스를 감싸는 컨테이너 */
.box-container {
    display: flex;
    gap: 50px;
    justify-content: center;
    margin: 20px 0; 
}

/* 공통 박스 스타일 */
.box {
    width: 200px;
    height: 200px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    background-color: #f1f2f4;
    border-radius: 15px;
    border: 1px solid #f1f2f4;
    font-weight: bold;
}

.box:hover {
    opacity: 0.8;
    border: 1px solid #111;
    cursor: pointer;    
}

#canvas {    
    display: flex;            
    flex-direction: column;
    overflow-y: scroll;
    justify-content: center;
    align-items: center;   
    background-color: #f1f2f4; 
    height: 90vh;
}

#canvas::-webkit-scrollbar {
    width: 10px;
}

#canvas::-webkit-scrollbar-thumb {
    height: 20%;
    background: #888888;
    border-radius: 10px;
}

#canvas .card {       
    position: relative;    
    justify-content: center;
    align-items: center;        
    max-height: 100%;
    perspective: 2000px;
    margin: 10px;
}

#canvas .card div {
    position: absolute;    
    top: 0;
    left: 0;
    transition: 0.5s;
    backface-visibility: hidden;
}

/* 액션 버튼 */
.resume-actions {
    max-width: 800px;
    margin: 0 auto;
    display: block;
    gap: 10px;
}

.action-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.action-btn.turn-button {
    background: #000;
    color: #fff;
    border: none;
}

.card-horizontal {    
    width: 60%;  
    aspect-ratio: 94 / 54;        
}

.card-horizontal-front {        
    width: 100%;
    height: 100%;
    background-color: white; 
    z-index: 1;
    position: relative;
    container-type: inline-size;
}

.card-horizontal-back {       
    width: 100%;
    height: 100%; 
    transform: rotateY(180deg);
    background-color: white; 
    position: relative;
    container-type: inline-size;
}

.card-vertical {        
    height: 80%;       
    aspect-ratio: 54 / 94;           
}

.card-vertical-front {   
    width: 100%;
    height: 100%;
    background-color: white; 
    z-index: 1;     
    container-type: inline-size;
            
}

.card-vertical-back {    
    width: 100%;
    height: 100%; 
    transform: rotateY(180deg);
    background-color: white;    
    container-type: inline-size;            
}

.tool-button {
    width: 60px;
    height: 60px;
    margin: auto;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    background-color: #fff;
    border-radius: 15px;
    border: 1px solid #fff;
    font-weight: bold;
}

.tool-button:hover {
    background-color: #f1f2f4;
    cursor: pointer;
}

.tool-bar {
    position: absolute;
    left: 0;
    width: 70px;
    height: calc(100vh - 80px);
    background-color: #fff;
    border: 1px solid #f1f2f4;
}

.side-panel {
    position: absolute;
    margin-left: 70px;
    width: 0px;
    height: calc(100vh - 80px);
    background-color: #fff;
    border: 1px solid #f1f2f4;
    overflow-y: scroll;
}

.card-template{     
    margin:  20px auto;        
    border: 1px solid black;
    background-color: #fff;

    width: 100%;
    height: 100%;
    background-color: white; 
    z-index: 1;
    position: relative;
    container-type: inline-size;
}

.card-template .card-element input{
    pointer-events: none;
}

.card-template:hover{    
    cursor: pointer;
}


.card-element{
    position: absolute;
    display: flex;
    align-items: center;
}

.card-input{
    width: 100%;  
    height: 100%; 
    border: 0;    
    text-align: center;
    background: transparent;
    font-size: clamp(10px, 3cqw, 40px);
}

.card-element input:focus {
  outline: none;
}

