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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd6e8 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    position: relative;
    overflow-x: hidden;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-btn {
    background: white;
    border: 2px solid #ff6b9d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.lang-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    padding: 5px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 100px;
}

.lang-menu.show {
    display: flex;
}

.lang-option {
    background: transparent;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #d63384;
    transition: all 0.3s ease;
    text-align: left;
}

.lang-option:hover {
    background: #ffeef8;
    color: #ff6b9d;
}

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 100px);
}


.card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.2);
    width: 100%;
    max-width: 100%;
    text-align: center;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
    margin: 0 auto;
    cursor: pointer;
    transform-origin: center center;
}

/* Mektup kapalı durumu */
.card.closed {
    width: 280px;
    height: 200px;
    padding: 20px;
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    background: linear-gradient(135deg, #fff 0%, #ffeef8 100%);
    position: relative;
    overflow: hidden;
}

.card.closed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    z-index: 2;
}

.card.closed::after {
    content: '💌';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    z-index: 3;
    animation: letterPulse 2s ease-in-out infinite;
}

@keyframes letterPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Mektup açık durumu */
.card.opened {
    width: 100%;
    max-width: 100%;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.2);
    background: white;
    animation: openLetter 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: default;
}

@keyframes openLetter {
    0% {
        transform: scale(0.8) rotateY(-10deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05) rotateY(5deg);
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

.card.closed .card-header,
.card.closed .card-content,
.card.closed .buttons {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.card.opened .card-header,
.card.opened .card-content,
.card.opened .buttons {
    opacity: 1;
    visibility: visible;
    height: auto;
    animation: fadeInContent 0.6s ease-in 0.3s both;
}

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

.card.closed::before,
.card.closed::after {
    display: block;
}

.card.opened::before,
.card.opened::after {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .card.closed:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 40px rgba(255, 105, 180, 0.4);
    }
    
    .btn-yes:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
    }
    
    .btn-no:hover {
        background: linear-gradient(135deg, #d0d0d0 0%, #c0c0c0 100%);
    }
    
    .lang-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
    }
    
    .lang-option:hover {
        background: #ffeef8;
        color: #ff6b9d;
    }
}

.success-card {
    padding: 50px 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
}

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

.card-content {
    margin-bottom: 60px;
}


.card-header {
    margin-bottom: 30px;
}

.card-header h1 {
    color: #ff6b9d;
    font-size: 32px;
    font-weight: 600;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-line {
    font-size: 24px;
    color: #d63384;
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    min-height: 60px;
    width: 100%;
    margin-top: 20px;
}

.btn {
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-yes {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
    position: relative;
    z-index: 5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-yes:active {
    transform: scale(0.98);
}

.btn-no {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    color: #666;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.6s ease;
}

.success-title {
    font-size: 48px;
    color: #ff6b9d;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

.success-subtitle {
    font-size: 28px;
    color: #d63384;
    margin-bottom: 30px;
    font-weight: 600;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.gif-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.love-gif {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
}

.love-message {
    font-size: 32px;
    color: #ff6b9d;
    margin-top: 30px;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .card.opened {
        padding: 45px 35px;
    }
    
    .success-card {
        padding: 45px 35px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .lang-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .lang-menu {
        min-width: 90px;
        top: 54px;
    }
    
    .lang-option {
        padding: 8px 12px;
        font-size: 15px;
    }
    
    .container {
        padding: 0 5px;
    }
    
    .card.opened {
        padding: 35px 25px;
        border-radius: 15px;
    }
    
    .success-card {
        padding: 35px 25px;
    }
    
    .card-header h1 {
        font-size: 26px;
    }
    
    .message-line {
        font-size: 19px;
        margin-bottom: 12px;
    }
    
    .card-content {
        margin-bottom: 40px;
    }
    
    .buttons {
        margin-top: 15px;
        gap: 15px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 16px;
        min-width: 130px;
        width: auto;
    }
    
    .success-title {
        font-size: 34px;
    }
    
    .success-subtitle {
        font-size: 21px;
    }
    
    .love-message {
        font-size: 24px;
    }
    
    .love-gif {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .language-selector {
        top: 8px;
        right: 8px;
    }
    
    .lang-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
        border-width: 1.5px;
    }
    
    .lang-menu {
        min-width: 85px;
        top: 52px;
        padding: 4px;
    }
    
    .lang-option {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .container {
        padding: 0;
    }
    
    .card.closed {
        width: 240px;
        height: 180px;
        padding: 15px;
    }
    
    .card.opened {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .success-card {
        padding: 30px 20px;
    }
    
    .card-header {
        margin-bottom: 20px;
    }
    
    .card-header h1 {
        font-size: 22px;
    }
    
    .card-content {
        margin-bottom: 30px;
    }
    
    .message-line {
        font-size: 17px;
        margin-bottom: 12px;
        line-height: 1.5;
    }
    
    .buttons {
        gap: 12px;
        margin-top: 15px;
        width: 100%;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 120px;
        flex: 1;
        max-width: 45%;
    }
    
    .success-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .success-subtitle {
        font-size: 19px;
        margin-bottom: 20px;
    }
    
    .love-message {
        font-size: 20px;
        margin-top: 20px;
    }
    
    .love-gif {
        max-width: 100%;
        width: 100%;
        max-width: 220px;
    }
    
    .gif-container {
        margin: 20px 0;
    }
}

@media (max-width: 360px) {
    body {
        padding: 5px;
    }
    
    .card.opened {
        padding: 25px 15px;
    }
    
    .success-card {
        padding: 25px 15px;
    }
    
    .card-header h1 {
        font-size: 20px;
    }
    
    .message-line {
        font-size: 16px;
    }
    
    .buttons {
        gap: 10px;
    }
    
    .btn {
        padding: 11px 18px;
        font-size: 13px;
        min-width: 110px;
        max-width: 48%;
    }
    
    .success-title {
        font-size: 24px;
    }
    
    .success-subtitle {
        font-size: 17px;
    }
    
    .love-message {
        font-size: 18px;
    }
}