/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "League Spartan", sans-serif;
}

body {
    background: url("bg.png") no-repeat center center/cover;
    height: 100vh;
    overflow: hidden;
}

/* INTRO SCREEN */
.intro-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* CALCULATOR TITLE FADE-IN */
.intro-title {
    opacity: 0;
    color: white;
    font-size: 75px;
    animation: fadeInTitle 1s forwards;
}

@keyframes fadeInTitle {
    to { opacity: 1; }
}

/* BUTTON WRAPPER */
.btn-wrapper {
    margin-top: 25px;
    opacity: 0;
    animation: fadeInBtn 1s forwards;
    animation-delay: 1s;  /* 1 seconds later */
}

@keyframes fadeInBtn {
    to { opacity: 1; }
}

/* APPLE STYLE OPEN BUTTON */
.open-btn {
    width: 350px;        /* fixed width */
    height: 40px;        /* bigger height */
    background: #ff9d15;
    border: none;
    border-radius: 25px;   /* rounder like iOS */
    color: white;
    font-size: 26px;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;     /* center multiline text */
    line-height: 1.2;
}


.open-btn:hover {
    transform: scale(1.06);
}

/* MAIN CALCULATOR HIDDEN INITIALLY */
.main-container {
    width: 300px;            /* smaller size */
    position: fixed;
    left: 50%;
    top: 210px;               /* EXACT TOP */
    transform: translateX(-50%) translateY(40px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.main-show {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto;
}   



/* WHEN INTRO MOVES UP */
.title-small {
    position: fixed;
    top: -235px;          /* 🔥 BILKUL TOP TOP */
    left: 50%;
    transform: translateX(-50%);
    font-size: 75px !important;
    transition: 0.5s ease-in;
    z-index: 9999;
}



/* DISPLAY */
.text {
    width: 100%;
    height: 90px;
    background: #000;
    border: none;
    color: white;
    font-size: 48px;
    text-align: right;
    padding: 15px;
    outline: none;
}

/* BUTTON GRID */
.buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.buttons div {
    display: flex;
    gap: 12px;
}

/* BUTTONS */
button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #333;
    border: none;
    color: white;
    font-size: 30px;
    transition: 0.15s;
}

.zero {
    width: 150px;
    border-radius: 35px;
}

/* TOP BUTTONS */
.row1 button {
    background: #a6a6a6;
    color: #000;
}

/* OPERATORS */
.row1 button:nth-child(4),
.row2 button:nth-child(4),
.row3 button:nth-child(4),
.row4 button:nth-child(4),
.row5 button:nth-child(3) {
    background: #FF9500;
}

/* BUTTON PRESS */
button.active {
    transform: scale(0.85);
    filter: brightness(0.8);
}

/* MADE BY */
.madeby {
    position: fixed;
    bottom: 20px;
    left: 20px;
    color: #aaa;
    font-size: 20px;
}

.text {
    width: 100%;
    height: 60px;
    background: transparent !important;    /* FIX */
    border: none;
    color: #fff;
    font-size: 38px;
    text-align: right;
    padding: 10px;
    outline: none;

    overflow-x: hidden;
    direction: ltr;
    unicode-bidi: plaintext;
    caret-color: transparent;
}

.top-icon {
    position: fixed;
    top: 40px;             /* distance from top */
    right: 50px;           /* distance from right */
    width:30px;           /* size of the icon */
    height: 40px;
    object-fit: contain;
    cursor: pointer;
    transition: 0.25s ease;
    z-index: 99999;        /* stays above everything */
}

/* Hover effect */
.top-icon:hover {
    transform: scale(1.2);
    filter: brightness(1);
}
